Bug 1369197 - Wait for customizationready when exiting customize mode in browserAction contentMenu tests. r=robwu

Differential Revision: https://phabricator.services.mozilla.com/D38123

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Luca Greco 2019-07-15 21:15:14 +00:00
parent af7e2b19f4
commit d574cd6956

View File

@ -638,7 +638,12 @@ add_task(async function browseraction_contextmenu_report_extension() {
// loaded in the existing blank tab.
if (customizing) {
info("Closing the about:addons tab");
BrowserTestUtils.removeTab(win.gBrowser.selectedTab);
let customizationReady = BrowserTestUtils.waitForEvent(
win.gNavToolbox,
"customizationready"
);
win.gBrowser.removeTab(win.gBrowser.selectedTab);
await customizationReady;
} else {
info("Navigate the about:addons tab to about:blank");
await BrowserTestUtils.loadURI(browser, "about:blank");