Backed out changeset cbd3b49c0c29 (bug 1345990) for failing M(c2)'s test_modal_windows.html on Android opt. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 06 May 2017 11:29:09 +0200
changeset 356883 e3bceb6eb287275e123cb92c487696c6c7325096
parent 356882 d5cc139abcfdf2b785fe68ee54afdd9283ccfbc2
child 356884 bce76b2df8cc5a22cadfc3c06c61b94533308586
push id31775
push userihsiao@mozilla.com
push dateMon, 08 May 2017 03:10:38 +0000
treeherdermozilla-central@22aaf8bad4df [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1345990
milestone55.0a1
backs outcbd3b49c0c2912567d66421bce8d106611aea598
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 cbd3b49c0c29 (bug 1345990) for failing M(c2)'s test_modal_windows.html on Android opt. r=backout
testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
--- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
+++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
@@ -91,62 +91,30 @@ this.BrowserTestUtils = {
     return Promise.resolve(result);
   }),
 
   /**
    * Opens a new tab in the foreground.
    *
    * @param {tabbrowser} tabbrowser
    *        The tabbrowser to open the tab new in.
-   * @param {string} opening (or url)
+   * @param {string} opening
    *        May be either a string URL to load in the tab, or a function that
    *        will be called to open a foreground tab. Defaults to "about:blank".
    * @param {boolean} waitForLoad
    *        True to wait for the page in the new tab to load. Defaults to true.
    * @param {boolean} waitForStateStop
    *        True to wait for the web progress listener to send STATE_STOP for the
    *        document in the tab. Defaults to false.
-   * @param {boolean} forceNewProcess
-   *        True to force the new tab to load in a new process. Defaults to
-   *        false.
-   * NB: tabbrowser may be an options object containing the rest of the
-   *     parameters.
    *
    * @return {Promise}
    *         Resolves when the tab is ready and loaded as necessary.
    * @resolves The new tab.
    */
-  openNewForegroundTab(tabbrowser, ...args) {
-    let options;
-    if (tabbrowser instanceof Ci.nsIDOMXULElement) {
-      // tabbrowser is a tabbrowser, read the rest of the arguments from args.
-      let [
-        opening = "about:blank",
-        waitForLoad = true,
-        waitForStateStop = false,
-      ] = args;
-
-      options = { opening, waitForLoad, waitForStateStop };
-    } else {
-      if ("url" in tabbrowser && !("opening" in tabbrowser)) {
-        tabbrowser.opening = tabbrowser.url;
-      }
-
-      let {
-        opening = "about:blank",
-        waitForLoad = true,
-        waitForStateStop = false,
-      } = tabbrowser;
-
-      tabbrowser = tabbrowser.gBrowser;
-      options = { opening, waitForLoad, waitForStateStop };
-    }
-
-    let { opening: opening, waitForLoad: aWaitForLoad, waitForStateStop: aWaitForStateStop } = options;
-
+  openNewForegroundTab(tabbrowser, opening = "about:blank", aWaitForLoad = true, aWaitForStateStop = false) {
     let tab;
     let promises = [
       BrowserTestUtils.switchTab(tabbrowser, function () {
         if (typeof opening == "function") {
           opening();
           tab = tabbrowser.selectedTab;
         }
         else {