Skip to content
Snippets Groups Projects
Commit 689a5fe4 authored by Markus Stange's avatar Markus Stange
Browse files

Bug 1704569 - Don't synthesize events on menus in...

Bug 1704569 - Don't synthesize events on menus in toolkit/components/printing/tests/browser_print_context_menu.js. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D111776
parent d93846aa
No related branches found
No related tags found
No related merge requests found
......@@ -26,12 +26,13 @@ add_task(async function testPrintFrame() {
);
await popupShownPromise;
let frameContextMenu = document.getElementById("frame");
let frameItem = document.getElementById("frame");
let frameContextMenu = frameItem.menupopup;
popupShownPromise = BrowserTestUtils.waitForEvent(
frameContextMenu,
"popupshown"
);
EventUtils.synthesizeMouseAtCenter(frameContextMenu, {});
frameItem.openMenu(true);
await popupShownPromise;
let popupHiddenPromise = BrowserTestUtils.waitForEvent(
......@@ -39,7 +40,7 @@ add_task(async function testPrintFrame() {
"popuphidden"
);
let item = document.getElementById("context-printframe");
EventUtils.synthesizeMouseAtCenter(item, {});
frameContextMenu.activateItem(item);
await popupHiddenPromise;
await BrowserTestUtils.waitForCondition(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment