mirror of
https://github.com/servo/servo.git
synced 2025-08-24 06:45:33 +01:00
Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534
Fixes #15648.
This commit is contained in:
parent
a1e4c547f0
commit
4fadf9b0b6
1184 changed files with 22551 additions and 9856 deletions
|
@ -366,5 +366,55 @@ promise_test(function(t) {
|
|||
'falls out finished state even though the current finished ' +
|
||||
'promise is generated soon after animation state became finished');
|
||||
|
||||
promise_test(function(t) {
|
||||
var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
var ready = false;
|
||||
animation.ready.then(
|
||||
t.step_func(function() {
|
||||
ready = true;
|
||||
}),
|
||||
t.unreached_func('Ready promise must not be rejected')
|
||||
);
|
||||
|
||||
var testSuccess = animation.finished.then(
|
||||
t.step_func(function() {
|
||||
assert_true(ready, 'Ready promise has resolved');
|
||||
}),
|
||||
t.unreached_func('Finished promise must not be rejected')
|
||||
);
|
||||
|
||||
var timeout = waitForAnimationFrames(3).then(function() {
|
||||
return Promise.reject('Finished promise did not arrive in time');
|
||||
});
|
||||
|
||||
animation.finish();
|
||||
return Promise.race([timeout, testSuccess]);
|
||||
}, 'Finished promise should be resolved after the ready promise is resolved');
|
||||
|
||||
promise_test(function(t) {
|
||||
var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
|
||||
var caught = false;
|
||||
animation.ready.then(
|
||||
t.unreached_func('Ready promise must not be resolved'),
|
||||
t.step_func(function() {
|
||||
caught = true;
|
||||
})
|
||||
);
|
||||
|
||||
var testSuccess = animation.finished.then(
|
||||
t.unreached_func('Finished promise must not be resolved'),
|
||||
t.step_func(function() {
|
||||
assert_true(caught, 'Ready promise has been rejected');
|
||||
})
|
||||
);
|
||||
|
||||
var timeout = waitForAnimationFrames(3).then(function() {
|
||||
return Promise.reject('Finished promise was not rejected in time');
|
||||
});
|
||||
|
||||
animation.cancel();
|
||||
return Promise.race([timeout, testSuccess]);
|
||||
}, 'Finished promise should be rejected after the ready promise is rejected');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -71,7 +71,7 @@ promise_test(function(t) {
|
|||
animation.cancel();
|
||||
|
||||
return retPromise;
|
||||
}, 'ready promise is rejected when a pause-pending animation is cancelled by'
|
||||
}, 'ready promise is rejected when a play-pending animation is cancelled by'
|
||||
+ ' calling cancel()');
|
||||
|
||||
promise_test(function(t) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue