Bug 857427 - Wait for focus before initiating a right click on the test page

--HG--
extra : rebase_source : 7f55838ed7cf08fdd2350886d852c7a507e8f5f5
This commit is contained in:
Ehsan Akhgari 2014-03-14 14:00:43 -04:00
parent 52139bdf6d
commit 3853772bbf

View File

@ -29,7 +29,7 @@ function triggerSave(aWindow, aCallback) {
info("found our page!");
testBrowser.removeEventListener("pageshow", pageShown, false);
executeSoon(function () {
waitForFocus(function () {
info("register to handle popupshown");
aWindow.document.addEventListener("popupshown", function(e) contextMenuOpened(aWindow, e), false);
@ -39,7 +39,7 @@ function triggerSave(aWindow, aCallback) {
{ type: "contextmenu", button: 2 },
testBrowser.contentWindow);
info("right clicked!");
});
}, testBrowser.contentWindow);
}, false);
function contextMenuOpened(aWindow, event) {