Bug 1396831 - Align HTTP status codes with specification. r?jgraham
Some of the HTTP status codes have changed in the WebDriver specification,
as shown in:
https://github.com/w3c/webdriver/commit/d678562e3d5f94fa71d74aeb467214bf8dd734e1
MozReview-Commit-ID: 4DLkYDXckew
--- a/testing/webdriver/src/error.rs
+++ b/testing/webdriver/src/error.rs
@@ -189,21 +189,21 @@ impl ErrorStatus {
InvalidArgument => BadRequest,
InvalidCookieDomain => BadRequest,
InvalidCoordinates => BadRequest,
InvalidElementState => BadRequest,
InvalidSelector => BadRequest,
InvalidSessionId => NotFound,
JavascriptError => InternalServerError,
MoveTargetOutOfBounds => InternalServerError,
- NoSuchAlert => BadRequest,
+ NoSuchAlert => NotFound,
NoSuchCookie => NotFound,
NoSuchElement => NotFound,
- NoSuchFrame => BadRequest,
- NoSuchWindow => BadRequest,
+ NoSuchFrame => NotFound,
+ NoSuchWindow => NotFound,
ScriptTimeout => RequestTimeout,
SessionNotCreated => InternalServerError,
StaleElementReference => BadRequest,
Timeout => RequestTimeout,
UnableToCaptureScreen => BadRequest,
UnableToSetCookie => InternalServerError,
UnexpectedAlertOpen => InternalServerError,
UnknownCommand => NotFound,