Bug 1103196 - Logically reorder variables defining session state; r=automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 01 Nov 2016 18:00:25 +0000
changeset 444158 a5f1137dadfc08200f3cc104505a1c191aa41d78
parent 444157 e1ff7fd473d637cac23ec57c27e4e4821860efc1
child 444159 5ba2870f3ba2399bb1a175bb09dcd413cada2b0f
push id37208
push userbmo:ato@mozilla.com
push dateSat, 26 Nov 2016 15:03:07 +0000
reviewersautomatedtester
bugs1103196
milestone53.0a1
Bug 1103196 - Logically reorder variables defining session state; r=automatedtester No functional changes in this patch. MozReview-Commit-ID: IWaao8AuZib
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -103,40 +103,48 @@ this.GeckoDriver = function(appName, ser
   this.appName = appName;
   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;
-  this.importedScripts = new evaluate.ScriptStorageService([Context.CHROME, Context.CONTENT]);
+  this.mozBrowserClose = null;
   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();
 
+  // user-defined timeouts
+  this.scriptTimeout = 30000;  // 30 seconds
+  this.searchTimeout = null;
+  this.pageTimeout = 300000;  // five minutes
+
+  // The curent context decides if commands should affect chrome- or
+  // content space.
+  this.context = Context.CONTENT;
+
+  this.importedScripts = new evaluate.ScriptStorageService(
+      [Context.CHROME, Context.CONTENT]);
+  this.sandboxes = new Sandboxes(() => this.getCurrentWindow());
+  this.actions = new action.Chain();
+
+  this.timer = null;
+  this.inactivityTimer = null;
+
+  this.marionetteLog = new logging.ContentLogger();
+  this.testName = null;
+
   this.sessionCapabilities = {
     // mandated capabilities
     "browserName": Services.appinfo.name.toLowerCase(),
     "browserVersion": Services.appinfo.version,
     "platformName": Services.sysinfo.getProperty("name").toLowerCase(),
     "platformVersion": Services.sysinfo.getProperty("version"),
 
     // supported features