Bug 1416966 - Add todo for checking one restyle after Animation.pause(). r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 12 Dec 2017 18:44:04 +0900
changeset 710846 844c6c4f03e077bbad19b118bce1e7d50be03a04
parent 710845 711112257bb3c5bc9aab5d931663b8dd349dc260
child 710847 5e7b12660b5e8b21a4402dceba094742b6073010
push id92911
push userhikezoe@mozilla.com
push dateTue, 12 Dec 2017 10:01:08 +0000
reviewersbirtles
bugs1416966
milestone59.0a1
Bug 1416966 - Add todo for checking one restyle after Animation.pause(). r?birtles Similar to the previous commit, if Animation.pause() is called between restyling process and the next refresh driver's tick and if we wait for Animation.ready after the pause(), there should be one restyle that hasn't yet processed. MozReview-Commit-ID: JnpwhOuDvPz
dom/animation/test/mozilla/file_restyles.html
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -612,37 +612,47 @@ waitForAllPaints(() => {
 
     await animation.ready;
     ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
 
     animation.pause();
 
     await animation.ready;
 
-    var markers = await observeStyling(5);
+    var markers = await observeStyling(1);
+    todo_is(markers.length, 1,
+            'Animations running on the compositor should restyle once after ' +
+            'Animation.pause() was called');
+
+    markers = await observeStyling(5);
     is(markers.length, 0,
-       'Bug 1232563: Paused animations running on the compositor should ' +
-       'never cause restyles once after pause() is called');
+       'Paused animations running on the compositor should never cause ' +
+       'restyles');
     await ensureElementRemoval(div);
   });
 
   add_task(async function no_restyling_main_thread_animations_after_pause_is_called() {
     var div = addDiv(null, { style: 'animation: background-color 100s' });
     var animation = div.getAnimations()[0];
 
     await animation.ready;
 
     animation.pause();
 
     await animation.ready;
 
-    var markers = await observeStyling(5);
+    var markers = await observeStyling(1);
+    todo_is(markers.length, 1,
+            'Animations running on the main-thread should restyle once after ' +
+            'Animation.pause() was called');
+
+    markers = await observeStyling(5);
     is(markers.length, 0,
-       'Bug 1232563: Paused animations running on the main-thread should ' +
-       'never cause restyles after pause() is called');
+       'Paused animations running on the main-thread should never cause ' +
+       'restyles');
     await ensureElementRemoval(div);
   });
 
   add_task_if_omta_enabled(async function only_one_restyling_when_current_time_is_set_to_middle_of_duration() {
     var div = addDiv(null, { style: 'animation: opacity 100s' });
     var animation = div.getAnimations()[0];
 
     await animation.ready;