Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type; r=ato+446296
authorMaja Frydrychowicz <mjzffr@gmail.com>
Fri, 17 Feb 2017 14:52:58 -0500
changeset 374051 2d7d58a97e464eb012500cf78fba8eb140361bcc
parent 374050 0aa0fd540ef05ec57401ba2d312f50e78bd1e6cb
child 374052 be1184fd991140be31772d89f90c36ec84f958f4
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1337133, 446296
milestone54.0a1
Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type; r=ato+446296 To be used in dispatch of pointerMove action. MozReview-Commit-ID: I9wPAKaoA47
testing/marionette/error.js
--- a/testing/marionette/error.js
+++ b/testing/marionette/error.js
@@ -10,16 +10,17 @@ const ERRORS = new Set([
   "ElementNotAccessibleError",
   "ElementNotVisibleError",
   "InsecureCertificateError",
   "InvalidArgumentError",
   "InvalidElementStateError",
   "InvalidSelectorError",
   "InvalidSessionIDError",
   "JavaScriptError",
+  "MoveTargetOutOfBoundsError",
   "NoAlertOpenError",
   "NoSuchElementError",
   "NoSuchFrameError",
   "NoSuchWindowError",
   "ScriptTimeoutError",
   "SessionNotCreatedError",
   "StaleElementReferenceError",
   "TimeoutError",
@@ -296,16 +297,23 @@ class JavaScriptError extends WebDriverE
     }
 
     super(msg);
     this.status = "javascript error";
     this.stack = trace;
   }
 }
 
+class MoveTargetOutOfBoundsError extends WebDriverError {
+  constructor (message) {
+    super(message);
+    this.status = "move target out of bounds";
+  }
+}
+
 class NoAlertOpenError extends WebDriverError {
   constructor (message) {
     super(message);
     this.status = "no such alert";
   }
 }
 
 class NoSuchElementError extends WebDriverError {
@@ -389,16 +397,17 @@ const STATUSES = new Map([
   ["element not accessible", ElementNotAccessibleError],
   ["element not visible", ElementNotVisibleError],
   ["insecure certificate", InsecureCertificateError],
   ["invalid argument", InvalidArgumentError],
   ["invalid element state", InvalidElementStateError],
   ["invalid selector", InvalidSelectorError],
   ["invalid session id", InvalidSessionIDError],
   ["javascript error", JavaScriptError],
+  ["move target out of bounds", MoveTargetOutOfBoundsError],
   ["no alert open", NoAlertOpenError],
   ["no such element", NoSuchElementError],
   ["no such frame", NoSuchFrameError],
   ["no such window", NoSuchWindowError],
   ["script timeout", ScriptTimeoutError],
   ["session not created", SessionNotCreatedError],
   ["stale element reference", StaleElementReferenceError],
   ["timeout", TimeoutError],