Bug 1662838 part 1: Adjust browser_promiseDocumentFlushed.js to use advanceTimeAndRefresh() instead of pausePainting(), as a way to pause the refresh driver. r=mconley,tnikkel

advanceTimeAndRefresh pauses the refresh driver, so it serves the same purpose
that pausePainting was serving here.

(This lets us remove the pausePainting() API entirely, because this was its
only callsite in our codebase.)

Differential Revision: https://phabricator.services.mozilla.com/D108147
This commit is contained in:
Daniel Holbert 2021-03-13 06:11:33 +00:00
Родитель 5f78d6f8ef
Коммит 3b10d100f6
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -167,8 +167,9 @@ add_task(async function test_resolved_in_window_close() {
await win.promiseDocumentFlushed(() => {});
let docShell = win.docShell;
docShell.contentViewer.pausePainting();
// Use advanceTimeAndRefresh to pause paints in the window:
let utils = win.windowUtils;
utils.advanceTimeAndRefresh(0);
win.gNavToolbox.style.padding = "5px";