forked from mirrors/gecko-dev
Automatic update from web-platform-tests [css-flexbox] Migrate overflow-auto-resizes-correctly.html test to WPT Partially migrate the contents of this test into the WPT-specific directory, including only the checks that can be upstreamed and leaving the parts that are Chromium-specific in the original test. In addition, this CL also adapts the description of the original Chromium-specific test to reflect what it actually does now after having removed some parts. In the newly-added test, we also add the relevant meta information i.e links to the relevant specs and a test assertion describing its purpose. Bug: 1063749 Change-Id: I57df80bf8a3c48dd94c70315a07d31715477a28b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2129537 Commit-Queue: Mario Sanchez Prada <mario@igalia.com> Reviewed-by: David Grogan <dgrogan@chromium.org> Reviewed-by: Robert Ma <robertma@chromium.org> Cr-Commit-Position: refs/heads/master@{#757780} -- wpt-commits: 36172f96469aa9f9d5af5d62858df3bc70b45f06 wpt-pr: 22569
50 lines
1.3 KiB
HTML
50 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<title>CSS Flexbox: adding scrollbars with overflow: auto and flex-direction: column.</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-properties">
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property">
|
|
<link rel="help" href="https://crbug.com/512229">
|
|
<meta name="assert" content="This test checks that, when a block inside a flexbox with flex-direction: column adds horizontal scrollbars due to overflow, the parent flexbox is still able to render its contents without overflowing."/>
|
|
|
|
<style>
|
|
.vflex {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 200px;
|
|
margin: 10px 0 10px 0;
|
|
}
|
|
|
|
.hbox {
|
|
overflow-x: auto;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.rect {
|
|
min-height: 100px;
|
|
min-width: 100px;
|
|
background-color: green;
|
|
display: inline-block;
|
|
}
|
|
</style>
|
|
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<body>
|
|
|
|
<div class="vflex">
|
|
<div class="hbox">
|
|
<div class="rect"></div>
|
|
<div class="rect"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
var hbox = document.querySelector('.hbox');
|
|
test(function() {
|
|
assert_equals(hbox.parentNode.clientHeight, hbox.parentNode.scrollHeight);
|
|
assert_equals(hbox.clientHeight, hbox.scrollHeight);
|
|
}, 'hbox dimensions');
|
|
</script>
|
|
</body>
|
|
</html>
|