Bug 1326534 - Lint a few statements in driver.js; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 30 Dec 2016 12:43:36 +0000
changeset 457107 a7a82945a3e3e086c884c4499ac7570b50d4a828
parent 457106 36ea2874be623e6b69a717d636cda327d1f55dd6
child 457108 f0695008e305a756c83a25156b9c0f25c9341f4e
push id40670
push userbmo:ato@mozilla.com
push dateFri, 06 Jan 2017 18:52:13 +0000
reviewersautomatedtester
bugs1326534
milestone53.0a1
Bug 1326534 - Lint a few statements in driver.js; r?automatedtester No functional changes. MozReview-Commit-ID: FP9p9tPr8Ce
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -183,17 +183,17 @@ this.GeckoDriver = function (appName, se
 
 Object.defineProperty(GeckoDriver.prototype, "a11yChecks", {
   get: function () { return this.sessionCapabilities["moz:accessibilityChecks"]; }
 });
 
 GeckoDriver.prototype.QueryInterface = XPCOMUtils.generateQI([
   Ci.nsIMessageListener,
   Ci.nsIObserver,
-  Ci.nsISupportsWeakReference
+  Ci.nsISupportsWeakReference,
 ]);
 
 /**
  * Switches to the global ChromeMessageBroadcaster, potentially replacing
  * a frame-specific ChromeMessageSender.  Has no effect if the global
  * ChromeMessageBroadcaster is already in use.  If this replaces a
  * frame-specific ChromeMessageSender, it removes the message listeners
  * from that sender, and then puts the corresponding frame script "to
@@ -365,18 +365,19 @@ GeckoDriver.prototype.whenBrowserStarted
       // so send the ack here. Otherwise, make a note of how many child scripts
       // will be loaded so we known when it's safe to return.
       // Child managers may not have child scripts yet (e.g. socialapi), only
       // count child managers that have children, but only count the top level
       // children as they are the ones that we expect a response from.
       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;
+          }
         }
       }
     }
 
     if (!Preferences.get(CONTENT_LISTENER_PREF) || !isNewSession) {
       // load listener into the remote frame
       // and any applicable new frames
       // opened after this call
@@ -508,18 +509,19 @@ GeckoDriver.prototype.listeningPromise =
     };
     this.mm.addMessageListener(li, cb);
   });
 };
 
 /** 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();
 
   this.newSessionCommandId = cmd.id;
   this.setSessionCapabilities(cmd.parameters.capabilities);
 
   this.scriptTimeout = 10000;