diff --git a/dom/animation/test/css-animations/file_event-order.html b/dom/animation/test/css-animations/file_event-order.html index 40266ee8c465..d965d698136f 100644 --- a/dom/animation/test/css-animations/file_event-order.html +++ b/dom/animation/test/css-animations/file_event-order.html @@ -38,9 +38,6 @@ events (${expectedEvents.map(event => event.type).join(', ')})`); function setupAnimation(t, animationStyle, receiveEvents) { const div = addDiv(t, { style: "animation: " + animationStyle }); - const watcher = new EventWatcher(t, div, [ 'animationstart', - 'animationiteration', - 'animationend' ]); ['start', 'iteration', 'end'].forEach(name => { div['onanimation' + name] = evt => { @@ -50,6 +47,10 @@ function setupAnimation(t, animationStyle, receiveEvents) { }; }); + const watcher = new EventWatcher(t, div, [ 'animationstart', + 'animationiteration', + 'animationend' ]); + const animation = div.getAnimations()[0]; return [animation, watcher, div];