Bug 1692027 - [devtools] Fix browser_jsterm_screenshot_command_clipboard.js intermittent. r=bomsy

Differential Revision: https://phabricator.services.mozilla.com/D105025
This commit is contained in:
Nicolas Chevobbe 2021-02-15 12:39:44 +00:00
Родитель 1afbbe67e1
Коммит bbf3b023c0
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -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