1
0
Fork 0
firefox/browser/components/customizableui/test/browser_open_from_popup.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
760 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();
SpecialPowers.spawn(gBrowser.selectedBrowser, [], 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);
});