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
--- 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);
});