Bug 1333014 - Lint testing/marionette/element.js; r?maja_zf draft
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 07 Feb 2017 19:18:40 +0000
changeset 503053 1be5efd424314981350644351476d549898f3b9a
parent 503052 77eef91711110b3f338ad04a92e9bfcfaec729bb
child 550325 5d9ea60542a0a738d39e81e837c98ea03c71d799
push id50471
push userbmo:ato@mozilla.com
push dateWed, 22 Mar 2017 19:18:41 +0000
reviewersmaja_zf
bugs1333014
milestone55.0a1
Bug 1333014 - Lint testing/marionette/element.js; r?maja_zf 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.