зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1195180 part 9 - Add test for seeking finished -> paused; r=heycam
This patch adds a test that even when we seek from being irrelevant to another state where we no longer need ticks that we still spin the refresh driver in order to queue and dispatch an animationstart event.
This commit is contained in:
Родитель
36c16f7957
Коммит
820618158a
|
@ -441,6 +441,24 @@ async_test(function(t) {
|
|||
animation.currentTime = currentTimeForAfterPhase(animation.timeline);
|
||||
}, 'Redundant change, after -> active, then back');
|
||||
|
||||
async_test(function(t) {
|
||||
var div = addDiv(t, {'class': 'animated-div'});
|
||||
var eventWatcher = new EventWatcher(t, div, CSS_ANIM_EVENTS);
|
||||
div.style.animation = ANIM_PROPERTY_VAL;
|
||||
var animation = div.getAnimations()[0];
|
||||
|
||||
animation.pause();
|
||||
animation.currentTime = currentTimeForAfterPhase(animation.timeline);
|
||||
|
||||
eventWatcher.wait_for(['animationstart',
|
||||
'animationend']).then(t.step_func(function() {
|
||||
animation.currentTime = currentTimeForActivePhase(animation.timeline);
|
||||
return eventWatcher.wait_for('animationstart');
|
||||
})).then(t.step_func(function() {
|
||||
t.done();
|
||||
}));
|
||||
|
||||
}, 'Seeking finished -> paused dispatches animationstart');
|
||||
|
||||
async_test(function(t) {
|
||||
var div = addDiv(t, {'class': 'animated-div'});
|
||||
|
|
Загрузка…
Ссылка в новой задаче