summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_open_from_popup.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /browser/components/customizableui/test/browser_open_from_popup.js
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/customizableui/test/browser_open_from_popup.js')
-rw-r--r--browser/components/customizableui/test/browser_open_from_popup.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/browser/components/customizableui/test/browser_open_from_popup.js b/browser/components/customizableui/test/browser_open_from_popup.js
new file mode 100644
index 0000000000..bf140fde79
--- /dev/null
+++ b/browser/components/customizableui/test/browser_open_from_popup.js
@@ -0,0 +1,24 @@
+"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);
+});