Bug 1444177 - Tweak expected restyle count for the test case where finite animation is unthrottled in out-of-view element. r=birtles, a=test-only
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 19 Mar 2018 12:46:23 +0900
changeset 462771 db9a442c2d731cf3362f4b79d7214caf0c230a32
parent 462770 d7bf437cc217eb9e3591950ac54c2653f8c2f07c
child 462772 6776c57cdbb9432346a9ebc125adfd7ba09fb1b3
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles, test-only
bugs1444177, 1425778
milestone60.0
Bug 1444177 - Tweak expected restyle count for the test case where finite animation is unthrottled in out-of-view element. r=birtles, a=test-only It might be possible that the animation does not start being restyled in the initial frame. Eventually we should drop tweakExpectedRestyleCount in bug 1425778 and replace it with a function that waits for animation.ready and waits to start being restyled something like this; async function waitForAnimationReadyToBeRestyled(aAnimation) { await aAnimation.ready; if (animationStartsRightNow(aAnimation)) { await waitForFrame(); } } MozReview-Commit-ID: ByN25hMAK76
dom/animation/test/mozilla/file_restyles.html
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -623,18 +623,20 @@ waitForAllPaints(() => {
                                 // This animation will move a bit but
                                 // will remain out-of-view.
                   100 * MS_PER_SEC);
     parentElement.appendChild(div);
 
     await animation.ready;
     ok(!SpecialPowers.wrap(animation).isRunningOnCompositor);
 
-    var markers = await observeStyling(20);
-    is(markers.length, 20,
+    const expectedRestyleCount = tweakExpectedRestyleCount(animation, 20);
+
+    var markers = await observeStyling(expectedRestyleCount);
+    is(markers.length, expectedRestyleCount,
        'Finite transform animation in out-of-view element should never be ' +
        'throttled');
 
     await ensureElementRemoval(parentElement);
   });
 
   add_task(async function restyling_main_thread_animations_in_scrolled_out_element() {
     var parentElement = addDiv(null,