Bug 1047603 - Make Marionette server force the initial browser to be remote when in an e10s window. r=chmanchester.
authorMike Conley <mconley@mozilla.com>
Thu, 05 Feb 2015 17:56:43 -0500
changeset 242190 179ab8bb80aeb209b9c7ce2565defa1395ed9e02
parent 242189 be43b4de674dac19ea48a5ed23d7bb64fca734fd
child 242191 ed3e996b3805c641dbda53c83907f87d3302995a
push id649
push userwcosta@mozilla.com
push dateWed, 11 Feb 2015 16:57:44 +0000
reviewerschmanchester
bugs1047603, 1096488
milestone38.0a1
Bug 1047603 - Make Marionette server force the initial browser to be remote when in an e10s window. r=chmanchester. Workaround until bug 1096488 gets fixed. A newly opened e10s window has an initial browser that is not remote, but that transitions to become remote as soon as it attempts to load a document. Marionette, unfortunately, is not prepared at this time to deal with transitions between remote and non-remote browsers. We work around this by forcing the initial browser to be remote when the window opens.
testing/marionette/marionette-server.js
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -3191,16 +3191,21 @@ BrowserObj.prototype = {
         this.browser = win.BrowserApp;
         break;
     }
   },
   /**
    * Called when we start a session with this browser.
    */
   startSession: function BO_startSession(newSession, win, callback) {
+    if (appName == "Firefox" &&
+        win.gMultiProcessBrowser &&
+        !win.gBrowser.selectedBrowser.isRemoteBrowser) {
+      win.XULBrowserWindow.forceInitialBrowserRemote();
+    }
     callback(win, newSession);
   },
 
   /**
    * Closes current tab
    */
   closeTab: function BO_closeTab() {
     if (this.browser &&