mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Update web-platform-tests to revision 89aa3f42131cce5a77268ddaeb2fab8a2e29c2a6
This commit is contained in:
parent
39963266ae
commit
ea00d34098
392 changed files with 5974 additions and 7614 deletions
|
@ -10,6 +10,11 @@
|
|||
<script src="../../resources/keyframe-tests.js"></script>
|
||||
<script src="../../resources/timing-utils.js"></script>
|
||||
<script src="../../resources/timing-tests.js"></script>
|
||||
<style>
|
||||
.pseudo::before {content: '';}
|
||||
.pseudo::after {content: '';}
|
||||
.pseudo::marker {content: '';}
|
||||
</style>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<iframe width="10" height="10" id="iframe"></iframe>
|
||||
|
@ -235,34 +240,59 @@ promise_test(async t => {
|
|||
assert_false(gotTransition, 'A transition should NOT have been triggered');
|
||||
}, 'Element.animate() does NOT trigger a style change event');
|
||||
|
||||
// Tests on CSSPseudoElement
|
||||
// Tests on pseudo-elements
|
||||
|
||||
test(t => {
|
||||
const pseudoTarget = getPseudoElement(t, 'before');
|
||||
const anim = pseudoTarget.animate(null);
|
||||
const div = createDiv(t);
|
||||
div.classList.add('pseudo');
|
||||
const anim = div.animate(null, {pseudoElement: '::before'});
|
||||
assert_class_string(anim, 'Animation', 'The returned object is an Animation');
|
||||
}, 'CSSPseudoElement.animate() creates an Animation object');
|
||||
}, 'animate() with pseudoElement parameter creates an Animation object');
|
||||
|
||||
test(t => {
|
||||
const pseudoTarget = getPseudoElement(t, 'marker');
|
||||
const anim = pseudoTarget.animate(null);
|
||||
const div = createDiv(t);
|
||||
div.classList.add('pseudo');
|
||||
div.style.display = 'list-item';
|
||||
const anim = div.animate(null, {pseudoElement: '::marker'});
|
||||
assert_class_string(anim, 'Animation', 'The returned object is an Animation for ::marker');
|
||||
}, 'CSSPseudoElement.animate() creates an Animation object for ::marker');
|
||||
}, 'animate() with pseudoElement parameter creates an Animation object for ::marker');
|
||||
|
||||
test(t => {
|
||||
const pseudoTarget = getPseudoElement(t, 'before');
|
||||
const anim = pseudoTarget.animate(null);
|
||||
assert_equals(anim.effect.target, pseudoTarget,
|
||||
'The returned Animation targets to the correct object');
|
||||
}, 'CSSPseudoElement.animate() creates an Animation object targeting ' +
|
||||
'to the correct CSSPseudoElement object');
|
||||
const div = createDiv(t);
|
||||
div.classList.add('pseudo');
|
||||
div.textContent = 'foo';
|
||||
const anim = div.animate(null, {pseudoElement: '::first-line'});
|
||||
assert_class_string(anim, 'Animation', 'The returned object is an Animation for ::first-line');
|
||||
}, 'animate() with pseudoElement parameter creates an Animation object for ::first-line');
|
||||
|
||||
test(t => {
|
||||
const pseudoTarget = getPseudoElement(t, 'marker');
|
||||
const anim = pseudoTarget.animate(null);
|
||||
assert_equals(anim.effect.target, pseudoTarget,
|
||||
'The returned Animation targets to the correct object for ::marker');
|
||||
}, 'CSSPseudoElement.animate() creates an Animation object targeting ' +
|
||||
'to the correct CSSPseudoElement object for ::marker');
|
||||
const div = createDiv(t);
|
||||
div.classList.add('pseudo');
|
||||
const anim = div.animate(null, {pseudoElement: '::before'});
|
||||
assert_equals(anim.effect.pseudoElement, '::before',
|
||||
'The returned Animation targets to the correct selector');
|
||||
}, 'animate() with pseudoElement an Animation object targeting ' +
|
||||
'to the correct pseudo-element');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.classList.add('pseudo');
|
||||
div.style.display = 'list-item';
|
||||
const anim = div.animate(null, {pseudoElement: '::marker'});
|
||||
assert_equals(anim.effect.pseudoElement, '::marker',
|
||||
'The returned Animation targets to the correct selector');
|
||||
}, 'animate() with pseudoElement an Animation object targeting ' +
|
||||
'to the correct pseudo-element for ::marker');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.classList.add('pseudo');
|
||||
div.textContent = 'foo';
|
||||
const anim = div.animate(null, {pseudoElement: '::first-line'});
|
||||
assert_equals(anim.effect.pseudoElement, '::first-line',
|
||||
'The returned Animation targets to the correct selector');
|
||||
}, 'animate() with pseudoElement an Animation object targeting ' +
|
||||
'to the correct pseudo-element for ::first-line');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue