Update web-platform-tests to revision cb32b4d04799e9de2e2505d7dddfab1429247070

This commit is contained in:
WPT Sync Bot 2020-11-21 08:21:14 +00:00
parent d3ebe51053
commit b89132d428
95 changed files with 1039 additions and 331 deletions

View file

@ -0,0 +1,80 @@
<!doctype html>
<meta charset="utf-8">
<title>overflow: scroll width/height should return overflow size</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#valdef-overflow-clip">
<link rel="author" title="Scott Violet" href="mailto:sky@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.parent {
width: 100px;
height: 101px;
}
.child {
width: 200px;
height: 201px;
}
.overflow_clip_and_border {
width: 100px;
height: 101px;
overflow: clip;
border-width: 2px;
border-style: solid;
}
</style>
<div id="parent-clip-both" class="parent" style="overflow: clip">
<div class="child"></div>
</div>
<div id="parent-clip-x" class="parent" style="overflow: clip-x">
<div class="child"></div>
</div>
<div id="parent-clip-y" class="parent" style="overflow: clip-y">
<div class="child"></div>
</div>
<div id="border-equal-clip" class="parent">
<div class="overflow_clip_and_border"
style="overflow-clip-margin: 2px">
<div class="child"></div>
</div>
</div>
<div id="border-smaller-clip" class="parent">
<div class="overflow_clip_and_border"
style="overflow-clip-margin: 3px">
<div class="child"></div>
</div>
</div>
<div id="border-greater-clip" class="parent">
<div class="overflow_clip_and_border"
style="overflow-clip-margin: 1px">
<div class="child"></div>
</div>
</div>
<script>
test(() => {
var pClipBoth = document.getElementById("parent-clip-both");
assert_equals(pClipBoth.scrollWidth, 200);
assert_equals(pClipBoth.scrollHeight, 201);
var pClipX = document.getElementById("parent-clip-x");
assert_equals(pClipX.scrollWidth, 200);
assert_equals(pClipX.scrollHeight, 201);
var pClipY = document.getElementById("parent-clip-y");
assert_equals(pClipY.scrollWidth, 200);
assert_equals(pClipY.scrollHeight, 201);
}, "scroll size should match that of size specified by overflow: clip");
test(() => {
assert_equals(document.getElementById("border-equal-clip").scrollWidth,
104);
assert_equals(document.getElementById("border-smaller-clip").scrollWidth,
105);
assert_equals(document.getElementById("border-greater-clip").scrollWidth,
104);
}, "scroll size should take into account border size and overflow-clip-margin");
</script>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<meta charset="utf-8">
<title>CSS Overflow Test: Testing an empty child box and its container's scrollable overflow area</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#scrollable">
<meta name="assert" content="This test verifies that an empty child box shouldn't contribute to its parents scrollable overflow area.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.container {
border: 1px solid black;
width: 200px;
height: 100px;
}
.empty {
position: relative;
width: 0px;
height: 0px;
left: 500px;
top: 300px;
box-shadow: 0 0 0 10px blue;
}
</style>
<body onload="checkLayout('.container')">
<p>You should see no scrollbars in these container because an empty child
box shouldn't contribute to its parents scrollable overflow area. </p>
<div class="container" style="overflow: visible"
data-expected-scroll-width="200" data-expected-scroll-height="100">
<div class="empty"></div>
</div>
<div class="container" style="overflow: auto"
data-expected-scroll-width="200" data-expected-scroll-height="100">
<div class="empty"></div>
</div>
<div class="container" style="overflow: hidden"
data-expected-scroll-width="200" data-expected-scroll-height="100">
<div class="empty"></div>
</div>
<div class="container" style="overflow: clip"
data-expected-scroll-width="200" data-expected-scroll-height="100">
<div class="empty"></div>
</div>
</body>
</html>