diff --git a/dom/events/test/test_bug607464.html b/dom/events/test/test_bug607464.html
index d67853339a25d..b8740d65a8071 100644
--- a/dom/events/test/test_bug607464.html
+++ b/dom/events/test/test_bug607464.html
@@ -61,9 +61,9 @@
}
}, true);
- flushApzRepaints(function() {
+ promiseApzRepaintsFlushed(win).then(function() {
scrollDown150PxWithPixelScrolling(scrollbox);
- }, win);
+ });
}, win);
}
diff --git a/gfx/layers/apz/test/mochitest/helper_long_tap.html b/gfx/layers/apz/test/mochitest/helper_long_tap.html
index 9eb3f952a56e1..3d9e014c32b14 100644
--- a/gfx/layers/apz/test/mochitest/helper_long_tap.html
+++ b/gfx/layers/apz/test/mochitest/helper_long_tap.html
@@ -58,7 +58,7 @@
if (eventsFired == 7) {
removeMouseEventListeners(target);
dump("Finished waiting for events, doing an APZ flush to see if any more unexpected events come through...\n");
- flushApzRepaints(function() {
+ promiseApzRepaintsFlushed().then(function() {
dump("Done APZ flush, ending test...\n");
subtestDone();
});
@@ -82,7 +82,7 @@
removeMouseEventListeners(target);
synthesizeNativeTouch(target, 5, 5, SpecialPowers.DOMWindowUtils.TOUCH_REMOVE, function() {
dump("Finished synthesizing touch-end, doing an APZ flush to see if any more unexpected events come through...\n");
- flushApzRepaints(function() {
+ promiseApzRepaintsFlushed().then(function() {
dump("Done APZ flush, ending test...\n");
subtestDone();
});