From 9a4394f2c5894886c79d2dff0bedcb9fad08f7c7 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Fri, 30 Dec 2016 12:43:36 +0000 Subject: [PATCH] Bug 1326534 - Lint a few statements in driver.js; r=automatedtester No functional changes. MozReview-Commit-ID: FP9p9tPr8Ce --HG-- extra : rebase_source : fb3e43203b417b119df2c0975c15aa95c1b16408 --- testing/marionette/driver.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testing/marionette/driver.js b/testing/marionette/driver.js index 6727aa8f771f..047ade803503 100644 --- a/testing/marionette/driver.js +++ b/testing/marionette/driver.js @@ -188,7 +188,7 @@ Object.defineProperty(GeckoDriver.prototype, "a11yChecks", { GeckoDriver.prototype.QueryInterface = XPCOMUtils.generateQI([ Ci.nsIMessageListener, Ci.nsIObserver, - Ci.nsISupportsWeakReference + Ci.nsISupportsWeakReference, ]); /** @@ -370,8 +370,9 @@ GeckoDriver.prototype.whenBrowserStarted = function (win, isNewSession) { if (mm.childCount !== 0) { this.curBrowser.frameRegsPending = 0; for (let i = 0; i < mm.childCount; i++) { - if (mm.getChildAt(i).childCount !== 0) + if (mm.getChildAt(i).childCount !== 0) { this.curBrowser.frameRegsPending += 1; + } } } } @@ -513,8 +514,9 @@ GeckoDriver.prototype.listeningPromise = function() { /** Create a new session. */ GeckoDriver.prototype.newSession = function*(cmd, resp) { if (this.sessionId) { - throw new SessionNotCreatedError("Maximum number of active sessions.") + throw new SessionNotCreatedError("Maximum number of active sessions"); } + this.sessionId = cmd.parameters.sessionId || cmd.parameters.session_id || element.generateUUID();