Backed out changeset 14becb61ce3c (bug 1311477)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 21 Oct 2016 08:51:27 +0200
changeset 318914 7a176dc5a703e33cb0e5cf889baeef91e3dfb9c4
parent 318913 1171f3ae792b91d7ca49ef0907b251e381f1df56
child 318915 206b9d6580ec957a847a663eead3d7b646b15fa4
push id30854
push userryanvm@gmail.com
push dateFri, 21 Oct 2016 21:08:02 +0000
treeherdermozilla-central@806054dd12bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1311477
milestone52.0a1
backs out14becb61ce3c4a83fa8a5e019687785274627bdf
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 14becb61ce3c (bug 1311477)
browser/base/content/test/general/browser_save_link-perwindowpb.js
--- a/browser/base/content/test/general/browser_save_link-perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_link-perwindowpb.js
@@ -10,26 +10,38 @@ MockFilePicker.init(window);
 // during the second request.
 function triggerSave(aWindow, aCallback) {
   info("started triggerSave");
   var fileName;
   let testBrowser = aWindow.gBrowser.selectedBrowser;
   // 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");
     aWindow.document.removeEventListener("popupshown", contextMenuOpened);
 
     // Create the folder the link will be saved into.
     var destDir = createTemporarySaveDirectory();
     var destFile = destDir.clone();