mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Backed out changeset 14becb61ce3c (bug 1311477)
This commit is contained in:
parent
ad36def0ad
commit
74705de438
@ -15,16 +15,28 @@ function triggerSave(aWindow, aCallback) {
|
||||
// This page sets a cookie if and only if a cookie does not exist yet
|
||||
let testURI = "http://mochi.test:8888/browser/browser/base/content/test/general/bug792517-2.html";
|
||||
testBrowser.loadURI(testURI);
|
||||
BrowserTestUtils.browserLoaded(testBrowser)
|
||||
.then(() => {
|
||||
testBrowser.addEventListener("pageshow", function pageShown(event) {
|
||||
info("got pageshow with " + event.target.location);
|
||||
if (event.target.location != testURI) {
|
||||
info("try again!");
|
||||
testBrowser.loadURI(testURI);
|
||||
return;
|
||||
}
|
||||
info("found our page!");
|
||||
testBrowser.removeEventListener("pageshow", pageShown, false);
|
||||
|
||||
waitForFocus(function () {
|
||||
info("register to handle popupshown");
|
||||
aWindow.document.addEventListener("popupshown", contextMenuOpened, false);
|
||||
|
||||
BrowserTestUtils.synthesizeMouseAtCenter("#fff", {type: "contextmenu", button: 2}, testBrowser);
|
||||
var link = testBrowser.contentDocument.getElementById("fff");
|
||||
info("link: " + link);
|
||||
EventUtils.synthesizeMouseAtCenter(link,
|
||||
{ type: "contextmenu", button: 2 },
|
||||
testBrowser.contentWindow);
|
||||
info("right clicked!");
|
||||
}, aWindow);
|
||||
});
|
||||
}, testBrowser);
|
||||
}, false);
|
||||
|
||||
function contextMenuOpened(event) {
|
||||
info("contextMenuOpened");
|
||||
|
Loading…
Reference in New Issue
Block a user