зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1109390 part 27 - Add further test to test_animations-pausing.html for cancelling a pause by setting the current time; r=jwatt
This commit is contained in:
Родитель
51d5cba7a7
Коммит
955a3c9adb
|
@ -176,4 +176,27 @@ async_test(function(t) {
|
|||
}, 'pause() applies pending changes to animation-play-state first');
|
||||
// (Note that we can't actually test for this; see comment above, in test-body.)
|
||||
|
||||
async_test(function(t) {
|
||||
var div = addDiv(t, { style: 'animation: anim 1000s' });
|
||||
var animation = div.getAnimations()[0];
|
||||
|
||||
var readyPromiseRun = false;
|
||||
|
||||
animation.ready.then(t.step_func(function() {
|
||||
div.style.animationPlayState = 'paused';
|
||||
assert_equals(animation.playState, 'pending', 'Animation is pause pending');
|
||||
|
||||
// Set current time
|
||||
animation.currentTime = 5000;
|
||||
assert_equals(animation.playState, 'running',
|
||||
'Animation is running immediately after setting currentTime');
|
||||
|
||||
// The ready promise should now be resolved. If it's not then test will
|
||||
// probably time out before anything else happens that causes it to resolve.
|
||||
return animation.ready;
|
||||
})).then(t.step_func(function() {
|
||||
t.done();
|
||||
}));
|
||||
}, 'Setting the current time cancels a pending pause');
|
||||
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче