As said in the spec: 5. If request’s method is POST: 1. Let parse result be the result of parsing as JSON with request’s body as the argument. If this process throws an exception, return an error with error code invalid argument and jump back to step 1 in this overall algorithm. 2. If parse result is not an Object, send an error with error code invalid argument and jump back to step 1 in this overall algorithm. Otherwise, let parameters be parse result. Otherwise, let parameters be null. 6.3 Processing Model https://w3c.github.io/webdriver/webdriver-spec.html#processing-model Now, w3c tests are sending null as body of delete session command (it used to be just empty), making it fail with invalid argument.
Created attachment 327403 [details] Patch
Committed r225083: <https://trac.webkit.org/changeset/225083>
<rdar://problem/35658285>