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 440470 11401b403dec608958a483a6afe15fb4e7c78474
parent 440469 4716b4f9aa689a141cd8b845bc4f8b2af8fd6c4c
child 440471 25a9827cbaf73582a9024a8a9689dffe142cf013
push id36225
push userbmo:ato@mozilla.com
push dateThu, 17 Nov 2016 15:30:50 +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,39 +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 = 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