Skip to content

Commit 28f5209

Browse files
mariosprchromium-wpt-export-bot
authored andcommitted
[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 <[email protected]> Reviewed-by: Robert Ma <[email protected]> Reviewed-by: Christian Biesinger <[email protected]> Cr-Commit-Position: refs/heads/master@{#754866}
1 parent 3e8378f commit 28f5209

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<title>CSS Flexbox: margin: auto and overflow: auto with nested flexboxes.</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#auto-margins">
5+
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-properties">
6+
<link rel="help" href="https://drafts.csswg.org/css-box-3/#margins">
7+
<link rel="help" href="https://crbug.com/605682">
8+
<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." />
9+
10+
<style>
11+
html, body {
12+
margin: 0;
13+
padding: 0;
14+
}
15+
16+
.flexbox {
17+
display: flex;
18+
background: papayawhip;
19+
width: 800px;
20+
}
21+
22+
.flexbox > div {
23+
width: 300px;
24+
height: 300px;
25+
margin: 0 auto;
26+
background: olive;
27+
}
28+
29+
.flexbox > div > div {
30+
overflow-y: auto;
31+
height: 50px;
32+
visibility: hidden;
33+
}
34+
35+
.elm {
36+
height: 10px;
37+
}
38+
</style>
39+
40+
<script src="/resources/testharness.js"></script>
41+
<script src="/resources/testharnessreport.js"></script>
42+
<script src="/resources/check-layout-th.js"></script>
43+
44+
<body>
45+
46+
<div id=log></div>
47+
<p>Below there should be a olive square <em>centered</em> inside a papayawhip box.</p>
48+
<div class="flexbox">
49+
<div data-offset-x="250">
50+
<div>
51+
<div id="elm"></div>
52+
</div>
53+
</div>
54+
</div>
55+
56+
<script>
57+
document.body.offsetTop;
58+
document.getElementById("elm").style.height = "800px";
59+
checkLayout('.flexbox');
60+
</script>
61+
</body>
62+
</html>

0 commit comments

Comments
 (0)