Bug 177127

Summary: WebDriver: wrong response in case of errors
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch bburg: review+

Description Carlos Garcia Campos 2017-09-19 02:04:24 PDT
I misunderstood the spec when I implemented this, so we either return a "value" key with the result in case of success or the error object as the body in case of error. We should always add a "value" key to the body and set it with either the result or the error object.

https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-an-error

Last step is "send a response", which is the same as when there's no error.
Comment 1 Carlos Garcia Campos 2017-09-19 02:15:41 PDT
Created attachment 321190 [details]
Patch
Comment 2 BJ Burg 2017-09-19 08:46:12 PDT
Comment on attachment 321190 [details]
Patch

r=me
Comment 3 Carlos Garcia Campos 2017-09-19 23:29:27 PDT
Committed r222255: <http://trac.webkit.org/changeset/222255>
Comment 4 Radar WebKit Bug Importer 2017-09-27 12:23:56 PDT
<rdar://problem/34693192>