Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 04 Mar 2016 18:03:28 +0000
changeset 323389 57e85125326d1a7c13d2ced96fe77cc019fc43b9
parent 323388 0da3648e25237a307a10b7362565950fbcd0ee28
child 323390 3bb19c9730afdd2501d08c88cd410fd04bd71c38
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1245064
milestone47.0a2
Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester a=test-only MozReview-Commit-ID: GXLGqjKCfVA
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -617,35 +617,37 @@ GeckoDriver.prototype.setSessionCapabili
       }
     }
 
     for (let key in from) {
       switch (key) {
         case "desiredCapabilities":
           to = copy(from[key], to);
           break;
+
         case "requiredCapabilities":
           if (from[key].proxy) {
               this.setUpProxy(from[key].proxy);
               to.proxy = from[key].proxy;
               delete from[key].proxy;
           }
           for (let caps in from[key]) {
             if (from[key][caps] !== this.sessionCapabilities[caps]) {
               errors.push(from[key][caps] + " does not equal " +
-                  this.sessionCapabilities[caps])   ;
+                  this.sessionCapabilities[caps]);
             }
           }
           break;
+
         default:
           to[key] = from[key];
       }
     }
 
-    if (Object.keys(errors).length === 0) {
+    if (Object.keys(errors).length == 0) {
       return to;
     }
 
     throw new SessionNotCreatedError(
         `Not all requiredCapabilities could be met: ${JSON.stringify(errors)}`);
   };
 
   // clone, overwrite, and set