fune/testing/web-platform/tests/css/css-flexbox/flexbox_width-wrapping-column.html
Julie Jeongeun Kim a6e080daa7 Bug 1626552 [wpt PR 22597] - [css-flexbox] Move wrapping-column-dynamic-changes.html to WPT, a=testonly
Automatic update from web-platform-tests
[css-flexbox] Move wrapping-column-dynamic-changes.html to WPT

This CL migrates 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 and renames it to
flexbox_width-wrapping-column.html.

Bug: 1063749
Change-Id: I2405aa2fea94b4e38a9d18a32c0594b145b1a9d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2131443
Commit-Queue: Julie Kim <jkim@igalia.com>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755683}

--

wpt-commits: 60760c1e8729a019ab55cbf33234a0be1163d203
wpt-pr: 22597
2020-04-06 12:44:05 +00:00

44 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<title>CSS Flexbox: the width calculation of flexbox with flex-direction: column and flex-wrap: wrap</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="help" href="https://drafts.csswg.org/css-flexbox/#flex-wrap-property">
<link rel="bookmark" href="https://crbug.com/607262">
<link rel="bookmark" href="https://crbug.com/607856">
<meta name="assert" content="This test ensures that the width of a flexbox with 'flex-direction: column' and 'flex-wrap: wrap' is updated when the wrapping column dynamically changes.">
<link href="support/flexbox.css" rel="stylesheet">
<style>
.flexbox {
width: 600px;
height: 160px;
outline: 2px solid black;
}
.item {
height: 20px;
background-color: green;
margin: 5px;
}
</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 flex = document.getElementById("test");
flex.offsetWidth;
flex.style.height = "60px";
checkLayout('.flexbox');
}
</script>
<body onload="change()">
<div id=log></div>
<p>The green boxes should all be within the black box</p>
<div class="flexbox column wrap" id="test">
<div class="item" data-expected-width="290"></div>
<div class="item" data-expected-width="290"></div>
<div class="item" data-expected-width="290"></div>
<div class="item" data-expected-width="290"></div>
</div>