Bug 1449746 - Make helper_hittest_backface_hidden.html more robust. r=kats
MozReview-Commit-ID: J0GH58j3X6U
--- a/gfx/layers/apz/test/mochitest/helper_hittest_backface_hidden.html
+++ b/gfx/layers/apz/test/mochitest/helper_hittest_backface_hidden.html
@@ -44,16 +44,23 @@ function* test(testDriver) {
var config = getHitTestConfig();
if (config.isWebRender) {
ok(true, "This test is only enabled for non-WebRender");
subtestDone();
return;
}
var subframe = document.getElementById('front');
+
+ // Set a displayport to ensure the subframe is layerized.
+ // This is not required for exercising the behavior we want to test,
+ // but it's needed to be able to assert the results reliably.
+ config.utils.setDisplayPortForElement(0, 0, 1000, 1000, subframe, 1);
+ yield waitForAllPaints(testDriver);
+
var subframeViewId = config.utils.getViewId(subframe);
var {hitInfo, scrollId} = hitTest(centerOf(subframe));
is(scrollId, subframeViewId,
"hit the scroll frame behind the backface-visibility:hidden element");
subtestDone();