gecko-dev/testing/web-platform/tests/css/css-flexbox/negative-overflow.html
Antonio Gomes 257d005cce Bug 1626067 [wpt PR 22547] - [css-flexbox]: Migrate negative-overflow.html to WPT, a=testonly
Automatic update from web-platform-tests
[css-flexbox]: Migrate negative-overflow.html to WPT

This CL moves negative-overflow.html from css3/flexbox to
external/wpt/css/css-flexbox.

<link ref=help|match> tags were added, as well as <title>.
CSS and JS referenced paths were also updated.

BUG=1063749
R=dgrogan@chromium.org

Change-Id: I4091fc870f51a31ac9fbac51b42eaa6cd33a16de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2127607
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754637}

--

wpt-commits: ea0cab74182aaef81fc73242f60c23be39b8007b
wpt-pr: 22547
2020-04-02 10:49:46 +00:00

98 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>CSS Flexbox: align-items: center/flex-end and bottom padding.</title>
<link rel="stylesheet" href="support/flexbox.css" >
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#align-items-property">
<meta name="assert" content="This test ensures that flexbox containers with 'align-items: center|flex-end' and 'overflow: auto/scroll' have no extra bottom padding."/>
<style>
.flexbox {
overflow: auto;
height: 50px;
width: 50px;
background-color: red;
position: relative;
}
.vertical-padding {
padding-top: 5px;
padding-bottom: 10px;
background-color: lime;
}
.vertical-border {
border-top: 2px solid black;
border-bottom: 8px solid lightblue;
}
.flexbox > div {
width: 100%;
height: 100px;
background-color: green;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
window.onload = function() {
checkLayout('.flexbox');
// Make failures more obvious by showing the red background that should have been clipped.
Array.prototype.forEach.call(document.querySelectorAll(".flexbox"), function(element) {
element.scrollTop = 1000;
});
};
</script>
</head>
<body>
<div id=log></div>
<div class="flexbox align-items-flex-end" data-expected-scroll-height="50">
<div></div>
</div>
<div class="flexbox align-items-flex-end" data-expected-scroll-height="150">
<div></div>
<div style="position: absolute; left: 0; top: 50px;"></div>
</div>
<div class="flexbox align-items-center" data-expected-scroll-height="75">
<div></div>
</div>
<div class="flexbox" data-expected-scroll-height="100">
<div></div>
</div>
<div class="flexbox wrap-reverse" data-expected-scroll-height="50">
<div></div>
<div></div>
</div>
<div class="flexbox align-items-flex-end vertical-padding" data-expected-scroll-height="65">
<div></div>
</div>
<div class="flexbox align-items-flex-end vertical-padding vertical-border" data-expected-scroll-height="65">
<div></div>
</div>
<div class="flexbox align-items-center vertical-padding" data-expected-scroll-height="90">
<div></div>
</div>
<div class="flexbox vertical-padding" data-expected-scroll-height="115">
<div></div>
</div>
<div class="flexbox vertical-padding vertical-border" data-expected-scroll-height="115">
<div></div>
</div>
<div class="flexbox wrap-reverse vertical-padding" data-expected-scroll-height="65">
<div></div>
<div></div>
</div>
</body>
</html>