Bug 1278268 - Fix a latent bug in a test where we try to scroll something before it's layerized. r?botond
MozReview-Commit-ID: 3vuujg6ARzl
--- a/gfx/layers/apz/test/mochitest/test_touch_listeners_impacting_wheel.html
+++ b/gfx/layers/apz/test/mochitest/test_touch_listeners_impacting_wheel.html
@@ -60,22 +60,26 @@ function takeSnapshots(e) {
// hogging with the code above. At this point we restore the normal refresh
// behaviour and let the main thread go back to C++ code, so the scroll events
// fire and we unwind from the main test continuation.
SpecialPowers.DOMWindowUtils.restoreNormalRefresh();
}
function* test(testDriver) {
var box = document.getElementById('box');
+
+ // Ensure the div is layerized by scrolling it
+ yield moveMouseAndScrollWheelOver(box, 10, 10, testDriver);
+
box.addEventListener('touchstart', function(e) {
ok(false, "This should never be run");
}, false);
box.addEventListener('wheel', takeSnapshots, { capture: false, passive: true });
- // Let the event regions propagate to the APZ
+ // Let the event regions and layerization propagate to the APZ
yield waitForAllPaints(function() {
flushApzRepaints(testDriver);
});
// Take over control of the refresh driver and compositor
var utils = SpecialPowers.DOMWindowUtils;
utils.advanceTimeAndRefresh(0);