mirror of
https://github.com/servo/servo.git
synced 2025-08-24 22:58:21 +01:00
Update web-platform-tests to revision 8fed98324bc133df221d778c62cbff210d43b0ce
This commit is contained in:
parent
be902d56c0
commit
8a6476740e
246 changed files with 15482 additions and 1281 deletions
|
@ -45,15 +45,31 @@ test(t => {
|
|||
}, 'The ready promise should be replaced if the animation is not already'
|
||||
+ ' pending');
|
||||
|
||||
promise_test(t => {
|
||||
promise_test(async t => {
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
const promise = animation.ready;
|
||||
return promise.then(p => {
|
||||
assert_equals(p, animation);
|
||||
assert_equals(animation.ready, promise);
|
||||
});
|
||||
const promiseResult = await promise;
|
||||
assert_equals(promiseResult, animation);
|
||||
assert_equals(animation.ready, promise);
|
||||
}, 'A pending ready promise should be resolved and not replaced when the'
|
||||
+ ' animation enters the running state');
|
||||
|
||||
promise_test(async t => {
|
||||
// Seek animation beyond target end
|
||||
const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
animation.currentTime = -100 * MS_PER_SEC;
|
||||
await animation.ready;
|
||||
|
||||
// Set pending playback rate to the opposite direction
|
||||
animation.updatePlaybackRate(-1);
|
||||
assert_true(animation.pending);
|
||||
assert_equals(animation.playbackRate, 1);
|
||||
|
||||
// When we play, we should seek to the target end, NOT to zero (which
|
||||
// is where we would seek to if we used the playbackRate of 1.
|
||||
animation.play();
|
||||
assert_time_equals_literal(animation.currentTime, 100 * MS_PER_SEC);
|
||||
}, 'A pending playback rate is used when determining auto-rewind behavior');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue