Update web-platform-tests to revision fb15e14b52049f952612623ee0d7fb7a620a57c9

This commit is contained in:
WPT Sync Bot 2018-11-01 21:34:37 -04:00
parent 200cc8aa6b
commit 4a942c982f
141 changed files with 2563 additions and 1589 deletions

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree">
<div id="host"><span id="slotted">This text should be green.</span></div>
<script>
const root = host.attachShadow({mode:"open"});
root.innerHTML = '<slot name="nomatch" style="color:green"></slot><slot style="color:red"></slot>';
test(() => {
assert_equals(getComputedStyle(slotted).color, "rgb(255, 0, 0)");
}, "Initial computed color.");
test(() => {
root.querySelector("slot").removeAttribute("name");
assert_equals(getComputedStyle(slotted).color, "rgb(0, 128, 0)");
}, "Computed color after re-slotting.");
</script>

View file

@ -5,3 +5,4 @@
<div>PASS</div>
<div>PASS</div>
<div style="color:green">PASS</div>
<div style="color:green">PASS</div>

View file

@ -7,6 +7,7 @@
<div id="host1"><span></span></div>
<div id="host2"><span></span></div>
<div id="host3"><span></span></div>
<div id="host4"><span></span></div>
<style>
#host3 > span::before { content: "PASS" }
</style>
@ -19,4 +20,12 @@
attachShadowWithSlottedStyle(host1, "::slotted(span)::before { content: 'PASS' }");
attachShadowWithSlottedStyle(host2, "::slotted(span)::after { content: 'PASS' }");
attachShadowWithSlottedStyle(host3, "::slotted(span)::before { content: 'FAIL'; color: green }");
attachShadowWithSlottedStyle(host4, `
::slotted(span)::before { content: 'PASS'; color: red }
::slotted(.foo)::before { color: green }
`);
onload = function() {
host4.offsetTop;
host4.firstElementChild.classList.add("foo");
}
</script>