Bug 1333014 - Lint testing/marionette/element.js; r=maja_zf a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 07 Feb 2017 19:18:40 +0000
changeset 395356 cf30efb78ec544326ccfc3465a7db632194d20b7
parent 395355 dca88c00f35a558eabd2441234473db2883b5ec6
child 395357 14f30c91790ab8056b0206357df0bcaa91a75861
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1333014
milestone54.0a2
Bug 1333014 - Lint testing/marionette/element.js; r=maja_zf a=test-only No functional changes. MozReview-Commit-ID: CK33FjpQMmO
testing/marionette/element.js
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -335,17 +335,17 @@ function find_(container, strategy, sele
  * @param {string} expr
  *     XPath search expression.
  *
  * @return {DOMElement}
  *     First element matching expression.
  */
 element.findByXPath = function (root, startNode, expr) {
   let iter = root.evaluate(expr, startNode, null,
-      Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE, null)
+      Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE, null);
   return iter.singleNodeValue;
 };
 
 /**
  * Find elements by XPath expression.
  *
  * @param {DOMElement} root
  *     Document root.
@@ -483,28 +483,29 @@ function findElement(using, value, rootN
       break;
 
     case element.Strategy.Selector:
       try {
         return startNode.querySelector(value);
       } catch (e) {
         throw new InvalidSelectorError(`${e.message}: "${value}"`);
       }
+      break;
 
     case element.Strategy.Anon:
       return rootNode.getAnonymousNodes(startNode);
 
     case element.Strategy.AnonAttribute:
       let attr = Object.keys(value)[0];
       return rootNode.getAnonymousElementByAttribute(startNode, attr, value[attr]);
 
     default:
       throw new InvalidSelectorError(`No such strategy: ${using}`);
   }
-};
+}
 
 /**
  * Find multiple elements.
  *
  * @param {element.Strategy} using
  *     Selector strategy to use.
  * @param {string} value
  *     Selector expression.