mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b202bbb5aa0d235b22bac11fe902eab1094ef9d2
This commit is contained in:
parent
9a6c96808b
commit
e90dd8bc6b
43 changed files with 669 additions and 286 deletions
|
@ -11,6 +11,39 @@
|
|||
<script>
|
||||
'use strict';
|
||||
|
||||
test(t => {
|
||||
const anim = new Animation();
|
||||
assert_equals(anim.playState, 'idle');
|
||||
assert_equals(anim.currentTime, null);
|
||||
|
||||
// This should not throw because the currentTime is already null.
|
||||
anim.currentTime = null;
|
||||
}, 'Setting the current time of a pending animation to unresolved does not'
|
||||
+ ' throw a TypeError');
|
||||
|
||||
promise_test(async t => {
|
||||
const anim = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
await anim.ready;
|
||||
|
||||
assert_greater_than_equal(anim.currentTime, 0);
|
||||
assert_throws({ name: 'TypeError' }, () => {
|
||||
anim.currentTime = null;
|
||||
});
|
||||
}, 'Setting the current time of a playing animation to unresolved throws a'
|
||||
+ ' TypeError');
|
||||
|
||||
promise_test(async t => {
|
||||
const anim = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
await anim.ready;
|
||||
anim.pause();
|
||||
|
||||
assert_greater_than_equal(anim.currentTime, 0);
|
||||
assert_throws({ name: 'TypeError' }, () => {
|
||||
anim.currentTime = null;
|
||||
});
|
||||
}, 'Setting the current time of a paused animation to unresolved throws a'
|
||||
+ ' TypeError');
|
||||
|
||||
promise_test(async t => {
|
||||
const anim = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
await anim.ready;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue