fune/testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html
Gyuyoung Kim 31d076b17a Bug 1626511 [wpt PR 22590] - [css-flexbox] Move stretched-child-shrink-on-relayout.html test to WPT, a=testonly
Automatic update from web-platform-tests
[css-flexbox] Move stretched-child-shrink-on-relayout.html test to WPT

This CL moves stretched-child-shrink-on-relayout.html test from
css3/css-flexbox to external/wpt/css/css-flexbox with WPT
styles, adding links to the relevant specs, and test description.

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

--

wpt-commits: 0768f4d42b7d04496a50cf51d6325d7218f5396c
wpt-pr: 22590
2020-04-06 12:44:03 +00:00

77 lines
2 KiB
HTML

<!DOCTYPE html>
<title>CSS Flexbox: Shrink stretched child on relayout</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-flow-property">
<meta name="assert" content="This ensures that flexbox shrinks stretched children after removing a sibling, in various writing-modes and flows.">
<style>
.flexbox {
display: flex;
background: papayawhip;
border: 1px solid midnightblue;
margin: 1em;
width: 50px;
}
.flexbox > div {
margin: 5px;
min-width: 10px;
min-height: 10px;
background-color: lawngreen;
}
.column {
flex-flow: column;
}
.horizontal-tb {
writing-mode: horizontal-tb;
}
.vertical-lr {
writing-mode: vertical-lr;
}
.largeitem {
height: 200px;
width: 200px;
margin: 5px;
}
</style>
</head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.flexbox')">
<div id=log></div>
<div class="flexbox">
<div data-expected-height=10 data-expected-width=10></div>
<div class="largeitem"></div>
</div>
<div class="flexbox column">
<div data-expected-height=10 data-expected-width=40></div>
<div class="largeitem"></div>
</div>
<div class="flexbox">
<div class="horizontal-tb" data-expected-height=10 data-expected-width=10></div>
<div class="largeitem"></div>
</div>
<div class="flexbox column">
<div class="horizontal-tb" data-expected-height=10 data-expected-width=40></div>
<div class="largeitem"></div>
</div>
<div class="flexbox">
<div class="vertical-lr" data-expected-height=10 data-expected-width=10></div>
<div class="largeitem"></div>
</div>
<div class="flexbox column">
<div class="vertical-lr" data-expected-height=10 data-expected-width=40></div>
<div class="largeitem"></div>
</div>
<script>
document.body.offsetTop;
var targets = document.getElementsByClassName('largeitem');
for (var i = targets.length - 1; i >= 0; i--) {
targets[i].remove();
};
</script>