blob: ab9b855905995503f99a468afc23f552b0a8e0f4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link href="resources/flexbox.css" rel="stylesheet">
<style>
.flexbox {
overflow: auto;
height: 50px;
width: 50px;
background-color: red;
position: relative;
}
.vertical-padding {
padding-top: 5px;
padding-bottom: 10px;
background-color: lime;
}
.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-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 wrap-reverse vertical-padding" data-expected-scroll-height="65">
<div></div>
<div></div>
</div>
</body>
</html>