gecko-dev/browser/components/customizableui/test/browser_open_from_popup.js
Victor Porof 1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00

24 lines
759 B
JavaScript

"use strict";
/**
* Check that opening customize mode in a popup opens it in the main window.
*/
add_task(async function open_customize_mode_from_popup() {
let promiseWindow = BrowserTestUtils.waitForNewWindow();
ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
content.window.open("about:blank", "_blank", "height=300,toolbar=no");
});
let win = await promiseWindow;
let customizePromise = BrowserTestUtils.waitForEvent(
gNavToolbox,
"customizationready"
);
win.gCustomizeMode.enter();
await customizePromise;
ok(
document.documentElement.hasAttribute("customizing"),
"Should have opened customize mode in the parent window"
);
await endCustomizing();
await BrowserTestUtils.closeWindow(win);
});