Bug 1316622 - Move internal interface construction last; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 10 Nov 2016 20:57:10 +0000
changeset 440370 cf95d91bebdb857b14dd7db54cf352b74d45a140
parent 440369 de03cd8be07e582bd92ba7fce10d31b4aad1a825
child 440371 86f80e546e8782914031e4576d87044862031b7f
child 441077 7470856c486f0179258f561eae96c5e52a2f4b16
push id36214
push userbmo:ato@mozilla.com
push dateThu, 17 Nov 2016 13:46:37 +0000
reviewersautomatedtester
bugs1316622
milestone53.0a1
Bug 1316622 - Move internal interface construction last; r?automatedtester No functional changes. MozReview-Commit-ID: 2reL23EOCVq
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -104,19 +104,21 @@ this.GeckoDriver = function(appName, ser
   this._server = server;
 
   this.sessionId = null;
   this.wins = new browser.Windows();
   this.browsers = {};
   // points to current browser
   this.curBrowser = null;
   this.context = Context.CONTENT;
+
   this.scriptTimeout = 30000;  // 30 seconds
   this.searchTimeout = 0;
   this.pageTimeout = 300000;  // five minutes
+
   this.timer = null;
   this.inactivityTimer = null;
   this.marionetteLog = new logging.ContentLogger();
   // topmost chrome frame
   this.mainFrame = null;
   // chrome iframe that currently has focus
   this.curFrame = null;
   this.mainContentFrameId = null;
@@ -124,17 +126,16 @@ this.GeckoDriver = function(appName, ser
   this.currentFrameElement = null;
   this.testName = null;
   this.mozBrowserClose = null;
   this.sandboxes = new Sandboxes(() => this.getCurrentWindow());
   // frame ID of the current remote frame, used for mozbrowserclose events
   this.oopFrameId = null;
   this.observing = null;
   this._browserIds = new WeakMap();
-  this.actions = new action.Chain();
 
   this.sessionCapabilities = {
     // mandated capabilities
     "browserName": Services.appinfo.name.toLowerCase(),
     "browserVersion": Services.appinfo.version,
     "platformName": Services.sysinfo.getProperty("name").toLowerCase(),
     "platformVersion": Services.sysinfo.getProperty("version"),
     "specificationLevel": 0,
@@ -165,16 +166,18 @@ this.GeckoDriver = function(appName, ser
   let handleDialog = (subject, topic) => {
     let winr;
     if (topic == modal.COMMON_DIALOG_LOADED) {
       winr = Cu.getWeakReference(subject);
     }
     this.dialog = new modal.Dialog(() => this.curBrowser, winr);
   };
   modal.addHandler(handleDialog);
+
+  this.actions = new action.Chain();
 };
 
 GeckoDriver.prototype.QueryInterface = XPCOMUtils.generateQI([
   Ci.nsIMessageListener,
   Ci.nsIObserver,
   Ci.nsISupportsWeakReference
 ]);