Bug 1670269, correctly initialize the page action panel in tests r=jaws

Differential Revision: https://phabricator.services.mozilla.com/D93097
This commit is contained in:
Emma Malysz 2020-10-09 16:49:36 +00:00
parent 633ab11df1
commit f58455e270
2 changed files with 3 additions and 3 deletions

View File

@ -114,9 +114,9 @@ add_task(async function toolbarButtons() {
await tabClose;
click(document.querySelector("#PlacesToolbarItems .bookmark-item"));
click("pageActionButton");
let pagePanel = elem("pageActionPanel");
shown = BrowserTestUtils.waitForEvent(pagePanel, "popupshown");
click("pageActionButton");
await shown;
hidden = BrowserTestUtils.waitForEvent(pagePanel, "popuphidden");

View File

@ -444,12 +444,12 @@ add_task(async function pageActions() {
"personal-bookmarks_pinned_bookmarks-bar",
]);
let panel = document.getElementById("pageActionPanel");
let button = document.getElementById("pageActionButton");
let context = document.getElementById("pageActionContextMenu");
let popupShown = BrowserTestUtils.waitForEvent(panel, "popupshown");
EventUtils.synthesizeMouseAtCenter(button, {}, window);
let panel = document.getElementById("pageActionPanel");
let popupShown = BrowserTestUtils.waitForEvent(panel, "popupshown");
await popupShown;
popupShown = BrowserTestUtils.waitForEvent(context, "popupshown");