mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Update web-platform-tests to revision dc60bfc45b49e3a5e653320e65b0fd447676b836
This commit is contained in:
parent
652a177ff5
commit
0bc549be55
690 changed files with 6588 additions and 1564 deletions
|
@ -36,6 +36,32 @@ test(t => {
|
|||
assert_time_equals_literal(animation.currentTime, 100 * MS_PER_SEC);
|
||||
}, 'Playing a finished and reversed animation seeks to end');
|
||||
|
||||
promise_test(async t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.finish();
|
||||
|
||||
// Initiate a pause then abort it
|
||||
animation.pause();
|
||||
animation.play();
|
||||
|
||||
// Wait to return to running state
|
||||
await animation.ready;
|
||||
|
||||
assert_true(animation.currentTime < 100 * 1000,
|
||||
'After aborting a pause when finished, the current time should'
|
||||
+ ' jump back to the start of the animation');
|
||||
}, 'Playing a pause-pending but previously finished animation seeks back to'
|
||||
+ ' to the start');
|
||||
|
||||
promise_test(async t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.finish();
|
||||
await animation.ready;
|
||||
|
||||
animation.play();
|
||||
assert_equals(animation.startTime, null, 'start time is unresolved');
|
||||
}, 'Playing a finished animation clears the start time');
|
||||
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.cancel();
|
||||
|
@ -54,6 +80,28 @@ promise_test(async t => {
|
|||
}, 'A pending ready promise should be resolved and not replaced when the'
|
||||
+ ' animation enters the running state');
|
||||
|
||||
promise_test(async t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
await animation.ready;
|
||||
|
||||
// Go to pause-pending state
|
||||
animation.pause();
|
||||
assert_true(animation.pending, 'Animation is pending');
|
||||
const pauseReadyPromise = animation.ready;
|
||||
|
||||
// Now play again immediately (abort the pause)
|
||||
animation.play();
|
||||
assert_true(animation.pending, 'Animation is still pending');
|
||||
assert_equals(animation.ready, pauseReadyPromise,
|
||||
'The pause Promise is re-used when playing while waiting'
|
||||
+ ' to pause');
|
||||
|
||||
// Sanity check: Animation proceeds to running state
|
||||
await animation.ready;
|
||||
assert_true(!animation.pending && animation.playState === 'running',
|
||||
'Animation is running after aborting a pause');
|
||||
}, 'If a pause operation is interrupted, the ready promise is reused');
|
||||
|
||||
promise_test(async t => {
|
||||
// Seek animation beyond target end
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue