Bug 1103196 - Logically reorder variables defining session state. r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 02 Dec 2016 07:45:00 -0500
changeset 352822 c0e5bdc1b1efce3c40d3e8440be95eb5bafcaf23
parent 352821 fd42bc259e210733cd90841768554fc53f39c0e5
child 352823 00acff678bfba629a09f9c0f630046f673146ded
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1103196
milestone52.0a2
Bug 1103196 - Logically reorder variables defining session state. r=automatedtester, a=test-only 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,40 +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 = 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