Bug 1396831 - Update wdclient and wdspec expected error codes. r?jgraham draft
authorAndreas Tolfsen <ato@sny.no>
Tue, 05 Sep 2017 16:11:17 +0100
changeset 659133 9bd09680c90580f0f546632ac26494ce329e344b
parent 659119 1f5e5c5aa25b44b02d829d69c22a557645a9c573
child 729894 793d9fda081b429818216391bc06293dacb65bd0
push id78027
push userbmo:ato@sny.no
push dateTue, 05 Sep 2017 15:12:06 +0000
reviewersjgraham
bugs1396831
milestone57.0a1
Bug 1396831 - Update wdclient and wdspec expected error codes. r?jgraham MozReview-Commit-ID: IwydIfDWRwC
testing/web-platform/tests/tools/webdriver/webdriver/error.py
testing/web-platform/tests/webdriver/tests/support/asserts.py
--- a/testing/web-platform/tests/tools/webdriver/webdriver/error.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/error.py
@@ -57,32 +57,32 @@ class JavascriptErrorException(WebDriver
 
 
 class MoveTargetOutOfBoundsException(WebDriverException):
     http_status = 500
     status_code = "move target out of bounds"
 
 
 class NoSuchAlertException(WebDriverException):
-    http_status = 400
+    http_status = 404
     status_code = "no such alert"
 
 
 class NoSuchElementException(WebDriverException):
     http_status = 404
     status_code = "no such element"
 
 
 class NoSuchFrameException(WebDriverException):
-    http_status = 400
+    http_status = 404
     status_code = "no such frame"
 
 
 class NoSuchWindowException(WebDriverException):
-    http_status = 400
+    http_status = 404
     status_code = "no such window"
 
 
 class ScriptTimeoutException(WebDriverException):
     http_status = 408
     status_code = "script timeout"
 
 
--- a/testing/web-platform/tests/webdriver/tests/support/asserts.py
+++ b/testing/web-platform/tests/webdriver/tests/support/asserts.py
@@ -10,21 +10,21 @@ errors = {
     "invalid argument": 400,
     "invalid cookie domain": 400,
     "invalid coordinates": 400,
     "invalid element state": 400,
     "invalid selector": 400,
     "invalid session id": 404,
     "javascript error": 500,
     "move target out of bounds": 500,
-    "no such alert": 400,
+    "no such alert": 404,
     "no such cookie": 404,
     "no such element": 404,
-    "no such frame": 400,
-    "no such window": 400,
+    "no such frame": 404,
+    "no such window": 404,
     "script timeout": 408,
     "session not created": 500,
     "stale element reference": 400,
     "timeout": 408,
     "unable to set cookie": 500,
     "unable to capture screen": 500,
     "unexpected alert open": 500,
     "unknown command": 404,