mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision a63c453b145fbf1ad72dd42c8cbf298fccd39825
This commit is contained in:
parent
a4fbad2533
commit
b34fc52dc2
169 changed files with 3407 additions and 3041 deletions
|
@ -0,0 +1,26 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: @keyframes applies to :host.</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#shadow-names">
|
||||
<div id="host"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
host.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<style>
|
||||
@keyframes myanim {
|
||||
from { background: red; }
|
||||
to { background: green; }
|
||||
}
|
||||
:host {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: blue;
|
||||
animation: myanim 10s infinite;
|
||||
}
|
||||
</style>
|
||||
`;
|
||||
|
||||
assert_equals(document.getElementById('host').getAnimations().length, 1);
|
||||
}, "@keyframes applies to the shadow host");
|
||||
</script>
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: @keyframes applies to ::slotted.</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#shadow-names">
|
||||
<div id="host"><div id="in-document"></div></div>
|
||||
<script>
|
||||
test(function() {
|
||||
host.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<style>
|
||||
@keyframes myanim {
|
||||
from { background: red; }
|
||||
to { background: green; }
|
||||
}
|
||||
::slotted(#in-document) {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: blue;
|
||||
animation: myanim 10s infinite;
|
||||
}
|
||||
</style>
|
||||
<slot />
|
||||
`;
|
||||
|
||||
assert_equals(document.getElementById('in-document').getAnimations().length, 1);
|
||||
}, "@keyframes in shadow tree applies to the slotted element");
|
||||
</script>
|
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: @keyframes should not leak out of shadow tree.</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#shadow-names">
|
||||
<style>
|
||||
#host {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: blue;
|
||||
animation: myanim 10s infinite;
|
||||
}
|
||||
</style>
|
||||
<div id="host"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
host.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<style>
|
||||
@keyframes myanim {
|
||||
from { background: red; }
|
||||
to { background: green; }
|
||||
}
|
||||
</style>
|
||||
`;
|
||||
|
||||
assert_equals(document.getElementById('host').getAnimations().length, 0);
|
||||
}, "@keyframes should not leak out of the shadow tree.");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue