Changeset 222703 in webkit


Ignore:
Timestamp:
Oct 2, 2017 2:09:07 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

WebDriver: HTTP status code is not correct for some of the errors
https://bugs.webkit.org/show_bug.cgi?id=177354

Reviewed by Brian Burg.

I think this changed in the spec at some point. The thing is that no such alert, frame and window and stale
element reference errors should return 404 instead of 400.

https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors

  • CommandResult.cpp:

(WebDriver::CommandResult::httpStatusCode const):

Location:
trunk/Source/WebDriver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebDriver/ChangeLog

    r222256 r222703  
     12017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        WebDriver: HTTP status code is not correct for some of the errors
     4        https://bugs.webkit.org/show_bug.cgi?id=177354
     5
     6        Reviewed by Brian Burg.
     7
     8        I think this changed in the spec at some point. The thing is that no such alert, frame and window and stale
     9        element reference errors should return 404 instead of 400.
     10
     11        https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors
     12
     13        * CommandResult.cpp:
     14        (WebDriver::CommandResult::httpStatusCode const):
     15
    1162017-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebDriver/CommandResult.cpp

    r221255 r222703  
    137137    case ErrorCode::InvalidElementState:
    138138    case ErrorCode::InvalidSelector:
     139        return 400;
    139140    case ErrorCode::NoSuchAlert:
     141    case ErrorCode::NoSuchCookie:
     142    case ErrorCode::NoSuchElement:
    140143    case ErrorCode::NoSuchFrame:
    141144    case ErrorCode::NoSuchWindow:
    142145    case ErrorCode::StaleElementReference:
    143         return 400;
    144     case ErrorCode::NoSuchCookie:
    145     case ErrorCode::NoSuchElement:
    146146    case ErrorCode::InvalidSessionID:
    147147    case ErrorCode::UnknownCommand:
Note: See TracChangeset for help on using the changeset viewer.