fune/testing/web-platform/tests/css/css-flexbox/overflow-auto-003.html
Mario Sanchez Prada ac8afbf52c Bug 1625890 [wpt PR 22525] - [css-flexbox] Migrate bug605682.html test from css3/flexbox to WPT, a=testonly
Automatic update from web-platform-tests
[css-flexbox] Migrate bug605682.html test from css3/flexbox to WPT

Migrate this test out of third_party/blink/web_tests/css3/flexbox
and into the WPT-specific directory, adding links to the relevant
specs and a test assertion describing its purpose.

Also, rename its filename to something more descriptive and less
Chromium-specific (it currently references crbug.com/605682).

Bug: 1063749
Change-Id: Iddba45cd44431e173f9d516d696da020f3412ac5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2126689
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: Robert Ma <robertma@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754866}

--

wpt-commits: 28f5209e3021cbc6684896ed9fb8a4362e161d6b
wpt-pr: 22525
2020-04-06 12:43:35 +00:00

62 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<title>CSS Flexbox: margin: auto and overflow: auto with nested flexboxes.</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#auto-margins">
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-properties">
<link rel="help" href="https://drafts.csswg.org/css-box-3/#margins">
<link rel="help" href="https://crbug.com/605682">
<meta name="assert" content="This test checks that 'margin: auto' set on the outer box gets properly handled when the inner box uses 'overflow: auto', in a layout with two nested flexboxes." />
<style>
html, body {
margin: 0;
padding: 0;
}
.flexbox {
display: flex;
background: papayawhip;
width: 800px;
}
.flexbox > div {
width: 300px;
height: 300px;
margin: 0 auto;
background: olive;
}
.flexbox > div > div {
overflow-y: auto;
height: 50px;
visibility: hidden;
}
.elm {
height: 10px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div id=log></div>
<p>Below there should be a olive square <em>centered</em> inside a papayawhip box.</p>
<div class="flexbox">
<div data-offset-x="250">
<div>
<div id="elm"></div>
</div>
</div>
</div>
<script>
document.body.offsetTop;
document.getElementById("elm").style.height = "800px";
checkLayout('.flexbox');
</script>
</body>
</html>