Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type. r=ato, a=test-only
authorMaja Frydrychowicz <mjzffr@gmail.com>
Fri, 17 Feb 2017 14:52:58 -0500
changeset 378819 406823a5be09b64a9eb07e61e9f538056eb68db1
parent 378818 54ce59792538f9e33c96a572936e0a60b30c2b4e
child 378820 8f0667a7bd40e686e73fbcbee41527d7bfc17b58
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1337133
milestone53.0a2
Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type. r=ato, a=test-only 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],