mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
Automatic update from web-platform-tests [css-flexbox] Migrate bug633212.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/633212). Bug: 1063749 Change-Id: I5c733fc995a0323a32ffd824e0713a6f251f7a50 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2126927 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@{#754879} -- wpt-commits: 55609dbda01e6945cb566c891bb9f84466d7f55a wpt-pr: 22529
59 lines
1.2 KiB
HTML
59 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<title>CSS Flexbox: layout of child SVG elements.</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property">
|
|
<link rel="help" href="https://drafts.csswg.org/css-position/#position-property">
|
|
<link rel="help" href="https://crbug.com/633212"/>
|
|
<meta name="assert" content="This test ensures that a flexbox and its flex items are properly laid out when containing an empty SVG element in an abspos container."/>
|
|
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
}
|
|
|
|
#flexbox {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
#flexitem {
|
|
outline: 1px solid black;
|
|
width: 100%;
|
|
height: 166px;
|
|
position: relative;
|
|
background: green;
|
|
}
|
|
|
|
#abspos {
|
|
position: absolute;
|
|
}
|
|
|
|
#container {
|
|
background: red;
|
|
}
|
|
</style>
|
|
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<body>
|
|
|
|
<div id="container">
|
|
<div id="flexbox">
|
|
<div id="flexitem">
|
|
<div id="abspos">
|
|
<svg></svg>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
test(function() {
|
|
assert_equals(document.getElementById('flexbox').offsetWidth,
|
|
document.getElementById('flexitem').offsetWidth);
|
|
}, "sizes");
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|