Bug 1316622 - Move internal interface construction last; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 10 Nov 2016 20:57:10 +0000
changeset 442870 83746c58a151cc2dec4cb47406024b2a107c4005
parent 442869 eb1958b15d6225a41347aaec5441fba909a319e0
child 442871 ae08a934581c11c79d1426ac7aebd478094fc39a
push id36854
push userbmo:ato@mozilla.com
push dateWed, 23 Nov 2016 13:38:54 +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,
@@ -157,16 +158,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
 ]);