mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Update web-platform-tests to revision e29e596073468910d8655a8ec23262f17543e147
This commit is contained in:
parent
e56db1f322
commit
5e2118728a
67 changed files with 1403 additions and 821 deletions
|
@ -22,8 +22,7 @@ test(t => {
|
|||
+ ' and no pending tasks')
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animation = div.animate({}, 100 * MS_PER_SEC);
|
||||
const animation = createDiv(t).animate({}, 100 * MS_PER_SEC);
|
||||
|
||||
animation.pause();
|
||||
|
||||
|
@ -134,8 +133,7 @@ test(t => {
|
|||
+ ' current time = 0');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animation = div.animate({}, 0);
|
||||
const animation = createDiv(t).animate({}, 0);
|
||||
assert_equals(animation.startTime, null,
|
||||
'Sanity check: start time should be unresolved');
|
||||
|
||||
|
@ -144,8 +142,7 @@ test(t => {
|
|||
+ ' current time = target effect end and there is a pending play task');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animation = div.animate({}, 100 * MS_PER_SEC);
|
||||
const animation = createDiv(t).animate({}, 100 * MS_PER_SEC);
|
||||
assert_equals(animation.startTime, null,
|
||||
'Sanity check: start time should be unresolved');
|
||||
|
||||
|
@ -153,5 +150,36 @@ test(t => {
|
|||
}, 'reports \'running\' when playback rate > 0 and'
|
||||
+ ' current time < target effect end and there is a pending play task');
|
||||
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate({}, 100 * MS_PER_SEC);
|
||||
assert_equals(animation.playState, 'running');
|
||||
assert_true(animation.pending);
|
||||
}, 'reports \'running\' for a play-pending animation');
|
||||
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate({}, 100 * MS_PER_SEC);
|
||||
animation.pause();
|
||||
assert_equals(animation.playState, 'paused');
|
||||
assert_true(animation.pending);
|
||||
}, 'reports \'paused\' for a pause-pending animation');
|
||||
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate({}, 0);
|
||||
assert_equals(animation.playState, 'finished');
|
||||
assert_true(animation.pending);
|
||||
}, 'reports \'finished\' for a finished-pending animation');
|
||||
|
||||
test(t => {
|
||||
const animation = createDiv(t).animate({}, 100 * MS_PER_SEC);
|
||||
// Set up the pending playback rate
|
||||
animation.updatePlaybackRate(-1);
|
||||
// Call play again so that we seek to the end while remaining play-pending
|
||||
animation.play();
|
||||
// For a pending animation, the play state should always report what the
|
||||
// play state _will_ be once we finish pending.
|
||||
assert_equals(animation.playState, 'running');
|
||||
assert_true(animation.pending);
|
||||
}, 'reports the play state based on the pending playback rate');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue