Bug 1455999 - Skip the visibility hidden test case on WebRender. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 24 Apr 2018 15:25:41 +0900
changeset 787076 c74ed0a23d1a600314a8d1253dcd967a92332c07
parent 786968 942670fae01b7058d671aaaea169dab2264eac35
child 787077 68a775e1dab2d16fb7e2e95aa90d8f1a355ba42f
push id107627
push userhikezoe@mozilla.com
push dateTue, 24 Apr 2018 06:26:11 +0000
reviewersbirtles
bugs1455999
milestone61.0a1
Bug 1455999 - Skip the visibility hidden test case on WebRender. r?birtles On WebRender, the animation on the visibility hidden element runs on the compositor somehow. MozReview-Commit-ID: 77dVlIeFQ3u
dom/animation/test/mozilla/file_restyles.html
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -160,16 +160,18 @@ function tweakExpectedRestyleCount(aAnim
   }
   return aExpectedRestyleCount;
 }
 
 var omtaEnabled = isOMTAEnabled();
 
 var isAndroid = !!navigator.userAgent.includes("Android");
 var hasConformantPromiseHandling;
+const isWebRender =
+  SpecialPowers.DOMWindowUtils.layerManagerType == 'WebRender';
 
 function add_task_if_omta_enabled(test) {
   if (!omtaEnabled) {
     info(test.name + " is skipped because OMTA is disabled");
     return;
   }
   add_task(test);
 }
@@ -707,17 +709,25 @@ waitForAllPaints(() => {
   });
 
   add_task_if_omta_enabled(async function no_restyling_compositor_animations_in_visibility_hidden_element() {
     var div = addDiv(null,
      { style: 'animation: opacity 100s; visibility: hidden' });
     var animation = div.getAnimations()[0];
 
     await animation.ready;
-    ok(!SpecialPowers.wrap(animation).isRunningOnCompositor);
+    if (!isWebRender) {
+      ok(!SpecialPowers.wrap(animation).isRunningOnCompositor);
+    } else {
+      // FIXME: Bug 1456389: The animation should be throttled on the
+      // main-thread (i.e. not to be sent to the compositor)
+      todo(!SpecialPowers.wrap(animation).isRunningOnCompositor,
+           'Animation in visibility:hidden element should NOT be running ' +
+           'on the compositor');
+    }
 
     var markers = await observeStyling(5);
 
     is(markers.length, 0,
        'Animations running on the compositor in visibility hidden element ' +
        'should never cause restyles');
     await ensureElementRemoval(div);
   });