diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /browser/components/uitour/test/browser_UITour_pocket.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/uitour/test/browser_UITour_pocket.js')
-rw-r--r-- | browser/components/uitour/test/browser_UITour_pocket.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/browser/components/uitour/test/browser_UITour_pocket.js b/browser/components/uitour/test/browser_UITour_pocket.js new file mode 100644 index 0000000000..072e1251e1 --- /dev/null +++ b/browser/components/uitour/test/browser_UITour_pocket.js @@ -0,0 +1,38 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +var gTestTab; +var gContentAPI; + +add_task(setup_UITourTest); + +add_UITour_task(async function test_menu_show() { + let panel = BrowserPageActions.activatedActionPanelNode; + Assert.ok( + !panel || panel.state == "closed", + "Pocket panel should initially be closed" + ); + gContentAPI.showMenu("pocket"); + + // The panel gets created dynamically. + panel = null; + await waitForConditionPromise(() => { + panel = BrowserPageActions.activatedActionPanelNode; + return panel && panel.state == "open"; + }, "Menu should be visible after showMenu()"); + + Assert.ok( + !panel.hasAttribute("noautohide"), + "@noautohide shouldn't be on the pocket panel" + ); + + panel.hidePopup(); + await new Promise(resolve => { + panel = BrowserPageActions.activatedActionPanelNode; + if (!panel || panel.state == "closed") { + resolve(); + } + }); +}); |