From bbf3b023c0d2d0a6ee24336b14e96e61f65fbc62 Mon Sep 17 00:00:00 2001 From: Nicolas Chevobbe Date: Mon, 15 Feb 2021 12:39:44 +0000 Subject: [PATCH] Bug 1692027 - [devtools] Fix browser_jsterm_screenshot_command_clipboard.js intermittent. r=bomsy Differential Revision: https://phabricator.services.mozilla.com/D105025 --- .../browser/browser_jsterm_screenshot_command_clipboard.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_clipboard.js b/devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_clipboard.js index 1fb7f7e32e77..dff8289c4886 100644 --- a/devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_clipboard.js +++ b/devtools/client/webconsole/test/browser/browser_jsterm_screenshot_command_clipboard.js @@ -88,9 +88,9 @@ async function testFullpageClipboardScrollbar(hud) { const command = `:screenshot --fullpage --clipboard ${dpr}`; await executeScreenshotClipboardCommand(hud, command); const contentSize = await getContentSize(); - const scrollbarSize = await getScrollbarSize(); const imgSize = await getImageSizeFromClipboard(); + const scrollbarSize = await getScrollbarSize(); is( imgSize.width, contentSize.innerWidth + @@ -132,6 +132,7 @@ async function createScrollbarOverflow() { // change System Preferences -> General -> Show scroll bars to Always. await SpecialPowers.spawn(gBrowser.selectedBrowser, [], function() { content.document.body.classList.add("overflow"); + return content.windowUtils.flushLayoutWithoutThrottledAnimations(); }); // Let's wait for next tick so scrollbars have the time to be rendered