Bug 1880529 - Requst animation frame at start of browser_test_resize. r=sfoster

Differential Revision: https://phabricator.services.mozilla.com/D208036
This commit is contained in:
Niklas Baumgardner 2024-04-30 13:22:00 +00:00
Родитель 417f937210
Коммит 5b6673f0bc
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -12,6 +12,8 @@ add_task(async function test_window_resize() {
url: RESIZE_TEST_PAGE,
},
async browser => {
await new Promise(r => window.requestAnimationFrame(r));
let helper = new ScreenshotsHelper(browser);
await helper.resizeContentWindow(windowWidth, window.outerHeight);
const originalContentDimensions = await helper.getContentDimensions();
@ -61,6 +63,8 @@ add_task(async function test_window_resize_vertical_writing_mode() {
content.document.documentElement.style = "writing-mode: vertical-lr;";
});
await new Promise(r => window.requestAnimationFrame(r));
let helper = new ScreenshotsHelper(browser);
await helper.resizeContentWindow(windowWidth, window.outerHeight);
const originalContentDimensions = await helper.getContentDimensions();