mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 6a665f63ae39b552f60b971f11c34b215861fcb3
This commit is contained in:
parent
2b0a48f291
commit
ee944e769d
119 changed files with 4924 additions and 556 deletions
|
@ -26,7 +26,8 @@ promise_test(async t => {
|
|||
div.style.animation = 'anim 100s';
|
||||
|
||||
const watcher = new EventWatcher(t, div, [ 'animationend',
|
||||
'animationcancel' ]);
|
||||
'animationcancel' ],
|
||||
fastEventsTimeout);
|
||||
const animation = div.getAnimations()[0];
|
||||
await animation.ready;
|
||||
|
||||
|
@ -90,7 +91,8 @@ promise_test(async t => {
|
|||
const div1 = addDiv(t);
|
||||
const div2 = addDiv(t);
|
||||
|
||||
const watcher1 = new EventWatcher(t, div1, 'animationstart');
|
||||
const watcher1 = new EventWatcher(t, div1, 'animationstart',
|
||||
fastEventsTimeout);
|
||||
// Watch |div2| as well to ensure it does *not* get events.
|
||||
const watcher2 = new EventWatcher(t, div2, 'animationstart');
|
||||
|
||||
|
@ -114,7 +116,8 @@ promise_test(async t => {
|
|||
const div = addDiv(t);
|
||||
const watcher = new EventWatcher(t, div, [ 'animationstart',
|
||||
'animationend',
|
||||
'animationcancel' ]);
|
||||
'animationcancel' ],
|
||||
fastEventsTimeout);
|
||||
div.style.animation = 'anim 100s';
|
||||
const animation = div.getAnimations()[0];
|
||||
animation.finish();
|
||||
|
|
|
@ -21,7 +21,8 @@ const setupAnimation = (t, animationStyle) => {
|
|||
const watcher = new EventWatcher(t, div, [ 'animationstart',
|
||||
'animationiteration',
|
||||
'animationend',
|
||||
'animationcancel' ]);
|
||||
'animationcancel' ],
|
||||
fastEventsTimeout);
|
||||
const animation = div.getAnimations()[0];
|
||||
|
||||
return { animation, watcher, div };
|
||||
|
|
|
@ -191,6 +191,15 @@ function waitForAnimationFrames(frameCount, onFrame) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Timeout function used for tests with EventWatchers when all animation events
|
||||
* should be received on the next animation frame. If two frames pass before
|
||||
* receiving the expected events, then we can immediate fail the test.
|
||||
*/
|
||||
function fastEventsTimeout() {
|
||||
return waitForAnimationFrames(2);
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrapper that takes a sequence of N animations and returns:
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue