Bug 1424949 - Wait for one more frame before checking animation start time to avoid the situation that the animation just begins at the time when it's ready. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 15 Dec 2017 01:36:04 +0900
changeset 711799 ab857d2350aa72afe02bb86d6c8e2e514b854cf4
parent 711798 5cf3b4424741e8e8e580113a54bbaf8e08dc4848
child 743878 8c1e05760569211af7f51a1050219142fbf04448
push id93148
push userhikezoe@mozilla.com
push dateThu, 14 Dec 2017 17:56:27 +0000
reviewersbirtles
bugs1424949
milestone59.0a1
Bug 1424949 - Wait for one more frame before checking animation start time to avoid the situation that the animation just begins at the time when it's ready. r?birtles MozReview-Commit-ID: 6bNfl10TiT6
dom/animation/test/css-animations/file_animations-dynamic-changes.html
--- a/dom/animation/test/css-animations/file_animations-dynamic-changes.html
+++ b/dom/animation/test/css-animations/file_animations-dynamic-changes.html
@@ -95,17 +95,17 @@ promise_test(function(t) {
 }, 'Only the startTimes of existing animations are preserved');
 
 promise_test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'anim1 100s, anim1 100s';
   var secondAnimation = div.getAnimations()[1];
 
   // Wait before continuing so we can compare start times
-  return secondAnimation.ready.then(waitForFrame).then(function() {
+  return secondAnimation.ready.then(waitForNextFrame).then(function() {
     // Trim list of animations
     div.style.animationName = 'anim1';
     var animations = div.getAnimations();
     assert_equals(animations.length, 1, 'List of Animations was trimmed');
     assert_equals(animations[0], secondAnimation,
                   'Remaining Animation is the second one in the list');
     assert_equals(typeof(animations[0].startTime), 'number',
                   'Remaining Animation has resolved startTime');