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 439896 9f9a1e53e925693ad9cbfc6df1c45db17b5f973f
parent 439895 e829f477cd7c29c545a77084ace78ff9cabb1ac0
child 439897 6f80533c593469ff9038ddd7d2c5d94737dd20d6
push id36117
push userbmo:ato@mozilla.com
push dateWed, 16 Nov 2016 18:26:33 +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
@@ -101,39 +101,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 = null;
-  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