fune/browser/components/uitour/test/browser_UITour_pocket.js
Drew Willcoxon 3c27aee62b Bug 1385418 - Remove disabled pocket code for the toolbar button now that it's been replaced by the item in the page action panel. r=Gijs
MozReview-Commit-ID: 1wANxaD3QaV

--HG--
extra : rebase_source : f87650ab8c09f7a313cda9b7ec73ee1e20d6fe34
2017-08-16 10:13:15 -07:00

34 lines
985 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
var gTestTab;
var gContentAPI;
var gContentWindow;
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();
}
});
});