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

Differential Revision: https://phabricator.services.mozilla.com/D111775
This commit is contained in:
Markus Stange 2021-04-13 16:22:20 +00:00
Родитель 2781564e2a
Коммит d93846aa9b
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -62,7 +62,7 @@ add_task(async () => {
gBrowser,
},
async browser => {
await openContextMenu(browser, videoId);
let contextMenu = await openContextMenu(browser, videoId);
info("Context menu is open.");
@ -79,7 +79,7 @@ add_task(async () => {
"Picture-in-Picture should be unchecked."
);
await EventUtils.synthesizeMouseAtCenter(menuItem, {});
contextMenu.activateItem(menuItem);
await SpecialPowers.spawn(browser, [videoId], async videoID => {
let video = content.document.getElementById(videoID);
@ -90,11 +90,11 @@ add_task(async () => {
info("PiP player is now open.");
await openContextMenu(browser, videoId);
contextMenu = await openContextMenu(browser, videoId);
info("Context menu is open again.");
await EventUtils.synthesizeMouseAtCenter(menuItem, {});
contextMenu.activateItem(menuItem);
await SpecialPowers.spawn(browser, [videoId], async videoID => {
let video = content.document.getElementById(videoID);