diff options
Diffstat (limited to 'browser/tools/mozscreenshots')
-rw-r--r-- | browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs | 10 | ||||
-rw-r--r-- | browser/tools/mozscreenshots/permissionPrompts/browser.toml | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs index b49f1be949..00a8f5d318 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.sys.mjs @@ -154,6 +154,11 @@ async function clickOn(selector, beforeContentFn) { await SpecialPowers.spawn(lastTab.linkedBrowser, [], beforeContentFn); } + let popupShownPromise = BrowserTestUtils.waitForEvent( + browserWindow.PopupNotifications.panel, + "popupshown" + ); + await SpecialPowers.spawn(lastTab.linkedBrowser, [selector], arg => { /* eslint-env mozilla/chrome-script */ let element = content.document.querySelector(arg); @@ -161,8 +166,5 @@ async function clickOn(selector, beforeContentFn) { }); // Wait for the popup to actually be shown before making the screenshot - await BrowserTestUtils.waitForEvent( - browserWindow.PopupNotifications.panel, - "popupshown" - ); + await popupShownPromise; } diff --git a/browser/tools/mozscreenshots/permissionPrompts/browser.toml b/browser/tools/mozscreenshots/permissionPrompts/browser.toml index 0ddc6302ed..96e59c1b6b 100644 --- a/browser/tools/mozscreenshots/permissionPrompts/browser.toml +++ b/browser/tools/mozscreenshots/permissionPrompts/browser.toml @@ -7,4 +7,3 @@ prefs = [ ] ["browser_permissionPrompts.js"] -skip-if = ["os == 'mac'"] # times out on macosx1014, see 1570098 |