Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type; r?ato draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Fri, 17 Feb 2017 14:52:58 -0500
changeset 489994 7fd4adbe913d68ddf1e68f1d114eebdecd99047a
parent 489993 bdbfab2ea83932e5aacf7c725972c176f73d2ee6
child 489995 0711794bfa4ce53c3dcc787437129a2420e8fc88
child 490010 8e3a0c6001672cf985dcca08f8fabc2f84bb3c73
push id46964
push userbmo:mjzffr@gmail.com
push dateMon, 27 Feb 2017 13:49:06 +0000
reviewersato
bugs1337133
milestone54.0a1
Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type; r?ato 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],