Update web-platform-tests to revision ac12b3e9488edb436f063b11213e954ae62d5a5e

This commit is contained in:
WPT Sync Bot 2019-01-30 20:36:46 -05:00
parent 65370f17c9
commit b56a3b8e69
111 changed files with 3122 additions and 68 deletions

View file

@ -3,12 +3,14 @@
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#containing-block-details">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level">
<style>
body { margin: 0px;}
.rel { position:relative; }
.inline-block { display:inline-block; width:100px; height:1px; }
.inline-block.large { width:200px; }
#target { position:absolute; width:100%; height:100px; background:green; }
#target-fixed { position:fixed; width:100%; height:100px; background:yellow; }
</style>
<p>There should be a green square below.</p>
<p>There should be a green square, and a yellow rectangle below.</p>
<div style="height:200px;">
<span class="rel" id="notContainingBlockOfTarget">
<div class="large inline-block"></div>
@ -17,6 +19,7 @@
<div class="inline-block"></div>
<span>
<div>
<div id="target-fixed"></div>
<div id="target"></div>
</div>
</span>
@ -28,6 +31,11 @@
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {
assert_equals(document.getElementById("target").offsetWidth, 100);
}, "Make sure that we're sized by the right ancestor");
assert_equals(document.getElementById("target").offsetWidth,
document.querySelector("#containingBlockOfTarget").offsetWidth);
}, "position:absolute should be sized by the right ancestor");
test(()=> {
assert_equals(document.getElementById("target-fixed").offsetWidth,
document.body.offsetWidth);
}, "position:fixed should be sized by the right ancestor");
</script>