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

--HG--
extra : rebase_source : 995b6de0fea25c3850720f10bd585510c78bf71f
This commit is contained in:
Maja Frydrychowicz 2017-02-17 14:52:58 -05:00
parent c5836d25cf
commit ecc7405607

View File

@ -15,6 +15,7 @@ const ERRORS = new Set([
"InvalidSelectorError",
"InvalidSessionIDError",
"JavaScriptError",
"MoveTargetOutOfBoundsError",
"NoAlertOpenError",
"NoSuchElementError",
"NoSuchFrameError",
@ -301,6 +302,13 @@ class JavaScriptError extends WebDriverError {
}
}
class MoveTargetOutOfBoundsError extends WebDriverError {
constructor (message) {
super(message);
this.status = "move target out of bounds";
}
}
class NoAlertOpenError extends WebDriverError {
constructor (message) {
super(message);
@ -394,6 +402,7 @@ const STATUSES = new Map([
["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],