Backed out changeset c11a0930afc2 (bug 1044600) for still making the change_app test go orange half the runs
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 12 Feb 2015 11:16:15 +0000
changeset 242534 8db110f4c10a91f0a2ce40de0b8958b0103c79c2
parent 242533 6a6bb80ab89661f6b9de4b63d492d64f2944e97f
child 242535 4cafbb821d67fdd396d2c49527a2d5b45c965b9b
push id660
push usermichael.l.comella@gmail.com
push dateThu, 12 Feb 2015 18:55:31 +0000
bugs1044600
milestone38.0a1
backs outc11a0930afc24693fb9f316ac28491142668a20d
Backed out changeset c11a0930afc2 (bug 1044600) for still making the change_app test go orange half the runs
browser/components/preferences/in-content/subdialogs.js
browser/components/preferences/in-content/tests/browser_subdialogs.js
--- a/browser/components/preferences/in-content/subdialogs.js
+++ b/browser/components/preferences/in-content/subdialogs.js
@@ -32,22 +32,16 @@ let gSubDialog = {
     chromeBrowser.addEventListener("DOMTitleChanged", this.updateTitle, true);
 
     // Similarly DOMFrameContentLoaded only fires on the top window
     window.addEventListener("DOMFrameContentLoaded", this._onContentLoaded.bind(this), true);
 
     // Wait for the stylesheets injected during DOMContentLoaded to load before showing the dialog
     // otherwise there is a flicker of the stylesheet applying.
     this._frame.addEventListener("load", this._onLoad.bind(this));
-
-    chromeBrowser.addEventListener("unload", function(aEvent) {
-      if (aEvent.target.location.href != "about:blank") {
-        this.close();
-      }
-    }.bind(this), true);
   },
 
   uninit: function() {
     let chromeBrowser = window.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIWebNavigation)
                               .QueryInterface(Ci.nsIDocShell)
                               .chromeEventHandler;
     chromeBrowser.removeEventListener("DOMTitleChanged", gSubDialog.updateTitle, true);
--- a/browser/components/preferences/in-content/tests/browser_subdialogs.js
+++ b/browser/components/preferences/in-content/tests/browser_subdialogs.js
@@ -71,17 +71,17 @@ let gTests = [{
     let dialog = yield dialogPromise;
 
     let closingPromise = promiseDialogClosing(dialog);
 
     info("cancelling the dialog");
     dialog.document.documentElement.cancelDialog();
 
     let closingEvent = yield closingPromise;
-    ise(closingEvent.detail.button, "cancel", "closing event should indicate button was 'cancel'");
+    ise(closingEvent.detail.button, "cancel", "closing event should indicate button was 'accept'");
 
     yield deferredClose.promise;
     ise(rv.acceptCount, 0, "return value should NOT have been updated");
   },
 },
 {
   desc: "Check window.close on the dialog",
   run: function* () {
@@ -114,32 +114,16 @@ let gTests = [{
     yield EventUtils.synthesizeMouseAtCenter(content.document.getElementById("dialogClose"), {},
                                              content.window);
 
     yield deferredClose.promise;
     ise(rv.acceptCount, 0, "return value should NOT have been updated");
   },
 },
 {
-  desc: "Check that 'back' navigation will close the dialog",
-  run: function* () {
-    let rv = { acceptCount: 0 };
-    let deferredClose = Promise.defer();
-    let dialogPromise = openAndLoadSubDialog(gDialogURL, null, rv,
-                                             (aEvent) => dialogClosingCallback(deferredClose, aEvent));
-    let dialog = yield dialogPromise;
-
-    info("cancelling the dialog");
-    content.gSubDialog._frame.goBack();
-
-    yield deferredClose.promise;
-    ise(rv.acceptCount, 0, "return value should NOT have been updated");
-  },
-},
-{
   desc: "Hitting escape in the dialog",
   run: function* () {
     let rv = { acceptCount: 0 };
     let deferredClose = Promise.defer();
     let dialogPromise = openAndLoadSubDialog(gDialogURL, null, rv,
                                              (aEvent) => dialogClosingCallback(deferredClose, aEvent));
     let dialog = yield dialogPromise;