forked from mirrors/gecko-dev
Automatic update from web-platform-tests [css-flexbox] Fix possible flakiness in two wpt tests These tests used script-after-body but also an external stylesheet. script-after-body can be run before the stylesheet has loaded. The script-after-body stuff is now in an onload handler. Bug: 1063749 Change-Id: Id725c51ef2375ba9584cfacfa81e328b2b586ebd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133271 Reviewed-by: Robert Ma <robertma@chromium.org> Commit-Queue: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#756106} -- wpt-commits: 01a03ed5f2ace88ad02dc6d12e0cd9dfca95445c wpt-pr: 22629
42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>CSS Flexbox: Flex children width when the parent width is changed</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers">
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property">
|
|
<link rel="bookmark" href="https://bugs.webkit.org/show_bug.cgi?id=108231">
|
|
<meta name="assert" content="Flexbox should relayout flex children when width changes.">
|
|
<link href="support/flexbox.css" rel="stylesheet">
|
|
<style>
|
|
.flexitem {
|
|
width: 100%;
|
|
height: 3em;
|
|
min-height: 3em;
|
|
}
|
|
.child {
|
|
background-color: salmon;
|
|
}
|
|
</style>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/check-layout-th.js"></script>
|
|
<script>
|
|
function change() {
|
|
var container = document.getElementById('container');
|
|
container.offsetWidth;
|
|
container.style.width = "200px";
|
|
checkLayout("#container");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="change()">
|
|
<div id=log></div>
|
|
<div id="container" style="width: 100px" data-expected-width="200">
|
|
<div class="flexbox column" data-expected-width="200">
|
|
<div class="flexitem" data-expected-width="200">
|
|
<div class="child" data-expected-width="200">This div should be 200px wide.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|