mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
Implement static Response.json (#36589)
Implements https://fetch.spec.whatwg.org/#dom-response-json Restructured the constructor to follow the spec more closely with a separate "initialize the response" algorithm. Testing: There are existing WPT tests for this. --------- Signed-off-by: Sebastian C <sebsebmc@gmail.com>
This commit is contained in:
parent
dc0c067c9b
commit
281d942981
6 changed files with 215 additions and 179 deletions
12
tests/wpt/meta/fetch/api/idlharness.any.js.ini
vendored
12
tests/wpt/meta/fetch/api/idlharness.any.js.ini
vendored
|
@ -29,12 +29,6 @@
|
|||
[Request interface: new Request('about:blank') must inherit property "duplex" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Response interface: operation json(any, optional ResponseInit)]
|
||||
expected: FAIL
|
||||
|
||||
[Response interface: calling json(any, optional ResponseInit) on new Response() with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[idlharness.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
@ -70,12 +64,6 @@
|
|||
[Request interface: new Request('about:blank') must inherit property "duplex" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Response interface: operation json(any, optional ResponseInit)]
|
||||
expected: FAIL
|
||||
|
||||
[Response interface: calling json(any, optional ResponseInit) on new Response() with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[idlharness.any.serviceworker.html]
|
||||
expected: ERROR
|
||||
|
|
|
@ -1,73 +1,3 @@
|
|||
[response-static-json.any.worker.html]
|
||||
[Check response returned by static json() with init undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"status":400}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"statusText":"foo"}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"headers":{}}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"headers":{"content-type":"foo/bar"}}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"headers":{"x-foo":"bar"}}]
|
||||
expected: FAIL
|
||||
|
||||
[Check static json() encodes JSON objects correctly]
|
||||
expected: FAIL
|
||||
|
||||
[Check static json() propagates JSON serializer errors]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with input 𝌆]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with input U+df06U+d834]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with input U+dead]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[response-static-json.any.html]
|
||||
[Check response returned by static json() with init undefined]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"status":400}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"statusText":"foo"}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"headers":{}}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"headers":{"content-type":"foo/bar"}}]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with init {"headers":{"x-foo":"bar"}}]
|
||||
expected: FAIL
|
||||
|
||||
[Check static json() encodes JSON objects correctly]
|
||||
expected: FAIL
|
||||
|
||||
[Check static json() propagates JSON serializer errors]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with input 𝌆]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with input U+df06U+d834]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static json() with input U+dead]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[response-static-json.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue