diff --git a/gfx/layers/apz/test/mochitest/apz_test_utils.js b/gfx/layers/apz/test/mochitest/apz_test_utils.js index b6a07c6adedf..9cbf95aeb278 100644 --- a/gfx/layers/apz/test/mochitest/apz_test_utils.js +++ b/gfx/layers/apz/test/mochitest/apz_test_utils.js @@ -209,6 +209,10 @@ function runSubtestsSeriallyInFreshWindows(aSubtests) { }); } +function pushPrefs(prefs) { + return SpecialPowers.pushPrefEnv({'set': prefs}); +} + function waitUntilApzStable() { return new Promise(function(resolve, reject) { SimpleTest.waitForFocus(function() { diff --git a/gfx/layers/apz/test/mochitest/test_layerization.html b/gfx/layers/apz/test/mochitest/test_layerization.html index 1ba093f1ec61..e85d6fdcfcdd 100644 --- a/gfx/layers/apz/test/mochitest/test_layerization.html +++ b/gfx/layers/apz/test/mochitest/test_layerization.html @@ -229,9 +229,7 @@ function startTest() { return; } - waitForAllPaints(function() { - flushApzRepaints(driveTest); - }) + driveTest(); } SimpleTest.waitForExplicitFinish(); @@ -243,12 +241,12 @@ SimpleTest.expectAssertions(0, 8); // we get a bunch of "ASSERTION: Bounds compu // wheel event as corresponding to a later wheel event. // Also enable APZ test logging, since we use that data to determine whether // a scroll frame was layerized. -SpecialPowers.pushPrefEnv({"set": [["general.smoothScroll", false], - ["apz.displayport_expiry_ms", 0], - ["apz.test.logging_enabled", true]]}, - function() { - SimpleTest.waitForFocus(startTest, window); - }); +pushPrefs([["general.smoothScroll", false], + ["apz.displayport_expiry_ms", 0], + ["apz.test.logging_enabled", true]]) +.then(waitUntilApzStable) +.then(startTest); + diff --git a/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html b/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html index 0868ffe73379..3349ef1abc7c 100644 --- a/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html +++ b/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html @@ -2,9 +2,10 @@ Test scrolling flattened inactive frames - + +