mirror of
https://github.com/servo/servo.git
synced 2025-08-17 03:15:34 +01:00
Update web-platform-tests to revision 2d42384cf21efd71843295d319c1bab85b3acf4a
This commit is contained in:
parent
f2b224d610
commit
e851ef0cd2
1014 changed files with 5653 additions and 1590 deletions
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that worklet animation with invalid effect cannot be played</title>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="common.js"></script>
|
||||
|
||||
<style>
|
||||
#target {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test(function() {
|
||||
registerPassthroughAnimator();
|
||||
let playFunc = function() {
|
||||
let effect = new KeyframeEffect(
|
||||
document.getElementById('target'),
|
||||
[
|
||||
// No keyframe.
|
||||
],
|
||||
{ duration: 1000 }
|
||||
);
|
||||
let animation = new WorkletAnimation('passthrough', effect);
|
||||
animation.play();
|
||||
}
|
||||
assert_throws('InvalidStateError', playFunc);
|
||||
}, 'Trying to play invalid worklet animation should throw an exception.');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue