diff --git a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js index ca15dff371cd..2f7012d584b4 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js @@ -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"); diff --git a/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js b/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js index ca47e0805ad9..e4ebdfeb4823 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js @@ -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");