Bug 1413817 - Tweak only_one_restyling_after_finish_is_called depending on the conformant Promise handling. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Thu, 09 Nov 2017 08:06:37 +0900
changeset 695302 c6d142f1289b19e68e18ef7191f7c5334625d17c
parent 695301 85eb455aa259b21caae27e05f178f449ee5d4abb
child 695303 9639e5647a44f48ed16ac9a826fe9e317f8447db
push id88383
push userhikezoe@mozilla.com
push dateThu, 09 Nov 2017 00:26:11 +0000
reviewersbirtles
bugs1413817, 1415457
milestone58.0a1
Bug 1413817 - Tweak only_one_restyling_after_finish_is_called depending on the conformant Promise handling. r?birtles I did intentionally use is() for bug 1415457 instead of todo_is() since we will not notice if we got 3 or more restyles there. MozReview-Commit-ID: 1uuP362I6o4
dom/animation/test/mozilla/file_restyles.html
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -218,19 +218,27 @@ waitForAllPaints(() => {
     var animation = div.getAnimations()[0];
 
     await waitForPaintsAndFrame();
     ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
 
     animation.finish();
 
     var markers = await observeStyling(5);
-    is(markers.length, 1,
-       'Animations running on the compositor should only update style ' +
-       'once after finish() is called');
+    if (hasConformantPromiseHandling) {
+      // FIXME: Bug 1415457: We should avoid a redundant restyling request
+      // for finished CSS animation by calling finish().
+      is(markers.length, 2,
+         'Animations running on the compositor should only update style ' +
+         'once after finish() is called');
+    } else {
+      is(markers.length, 1,
+         'Animations running on the compositor should only update style ' +
+         'once after finish() is called');
+    }
     await ensureElementRemoval(div);
   });
 
   add_task(async function no_restyling_mouse_movement_on_finished_transition() {
     var div = addDiv(null, { style: 'transition: opacity 1ms; opacity: 0' });
     getComputedStyle(div).opacity;
     div.style.opacity = 1;