mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #12722 - jeenalee:request-response-test, r=jdm
Enable Request API and Response API tests <!-- Please describe your changes on the following line: --> This will enable the Request API and Response API tests, which will be useful for PR #12700 and the future PR regarding the Response API. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12722) <!-- Reviewable:end -->
This commit is contained in:
commit
04ac84d2aa
30 changed files with 509 additions and 1 deletions
|
@ -23,6 +23,10 @@ skip: true
|
|||
skip: true
|
||||
[headers]
|
||||
skip: false
|
||||
[request]
|
||||
skip: false
|
||||
[response]
|
||||
skip: false
|
||||
[FileAPI]
|
||||
skip: false
|
||||
[hr-time]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[Element-matches.html]
|
||||
type: testharness
|
||||
|
||||
[In-document Element.matches: :lang pseudo-class selector, matching inherited language (with no refNodes): #pseudo-lang-div1:lang(en)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
[request-cache.html]
|
||||
type: testharness
|
||||
[RequestCache "default" mode checks the cache for previously cached content and goes to the network for stale responses with Etag and stale response]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[request-clone.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,5 @@
|
|||
[request-consume-empty.html]
|
||||
type: testharness
|
||||
[Consume request's body as text]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[request-consume.html]
|
||||
type: testharness
|
||||
[Consume request's body as text]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[request-disturbed.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
62
tests/wpt/metadata/fetch/api/request/request-error.html.ini
Normal file
62
tests/wpt/metadata/fetch/api/request/request-error.html.ini
Normal file
|
@ -0,0 +1,62 @@
|
|||
[request-error.html]
|
||||
type: testharness
|
||||
[RequestInit's window is not null]
|
||||
expected: FAIL
|
||||
|
||||
[Input URL is not valid]
|
||||
expected: FAIL
|
||||
|
||||
[Input URL has credentials]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's mode is navigate]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's referrer is invalid]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's referrer has invalid origin]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's method is invalid]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's method is forbidden]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's mode is no-cors and method is not simple]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's mode is no-cors and integrity is not empty]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's cache mode is only-if-cached and mode is not same-origin]
|
||||
expected: FAIL
|
||||
|
||||
[Request should get its content-type from the init request]
|
||||
expected: FAIL
|
||||
|
||||
[Request should not get its content-type from the init request if init headers are provided]
|
||||
expected: FAIL
|
||||
|
||||
[Request should get its content-type from the body if none is provided]
|
||||
expected: FAIL
|
||||
|
||||
[Request should get its content-type from init headers if one is provided]
|
||||
expected: FAIL
|
||||
|
||||
[Bad referrerPolicy init parameter value]
|
||||
expected: FAIL
|
||||
|
||||
[Bad mode init parameter value]
|
||||
expected: FAIL
|
||||
|
||||
[Bad credentials init parameter value]
|
||||
expected: FAIL
|
||||
|
||||
[Bad cache init parameter value]
|
||||
expected: FAIL
|
||||
|
||||
[Bad redirect init parameter value]
|
||||
expected: FAIL
|
||||
|
164
tests/wpt/metadata/fetch/api/request/request-headers.html.ini
Normal file
164
tests/wpt/metadata/fetch/api/request/request-headers.html.ini
Normal file
|
@ -0,0 +1,164 @@
|
|||
[request-headers.html]
|
||||
type: testharness
|
||||
[Adding valid request header "Content-Type: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid request header "Potato: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid request header "proxy: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid request header "proxya: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid request header "sec: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid request header "secb: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Accept-Charset: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "accept-charset: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "ACCEPT-ENCODING: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Accept-Encoding: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Access-Control-Request-Headers: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Access-Control-Request-Method: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Connection: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Content-Length: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Cookie: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Cookie2: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Date: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "DNT: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Expect: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Host: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Keep-Alive: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Origin: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Referer: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "TE: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Trailer: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Transfer-Encoding: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Upgrade: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Via: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Proxy-: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "proxy-a: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "Sec-: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid request header "sec-b: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "Accept: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "Accept-Language: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "content-language: OK"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "content-type: application/x-www-form-urlencoded"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "content-type: application/x-www-form-urlencoded;charset=UTF-8"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "content-type: multipart/form-data"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "content-type: multipart/form-data;charset=UTF-8"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "content-TYPE: text/plain"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding valid no-cors request header "CONTENT-type: text/plain;charset=UTF-8"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid no-cors request header "Content-Type: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid no-cors request header "Potato: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid no-cors request header "proxy: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid no-cors request header "proxya: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid no-cors request header "sec: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Adding invalid no-cors request header "secb: KO"]
|
||||
expected: FAIL
|
||||
|
||||
[Check that request constructor is filtering headers provided as init parameter]
|
||||
expected: FAIL
|
||||
|
||||
[Check that no-cors request constructor is filtering headers provided as init parameter]
|
||||
expected: FAIL
|
||||
|
||||
[Check that no-cors request constructor is filtering headers provided as part of request parameter]
|
||||
expected: FAIL
|
||||
|
||||
[Request should get its content-type from the init request]
|
||||
expected: FAIL
|
||||
|
||||
[Request should not get its content-type from the init request if init headers are provided]
|
||||
expected: FAIL
|
||||
|
||||
[Request should get its content-type from the body if none is provided]
|
||||
expected: FAIL
|
||||
|
||||
[Request should get its content-type from init headers if one is provided]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[request-idl.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,107 @@
|
|||
[request-init-001.sub.html]
|
||||
type: testharness
|
||||
[Check method init value of GET and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check method init value of HEAD and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check method init value of POST and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check method init value of PUT and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check method init value of DELETE and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check method init value of OPTIONS and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check method init value of head and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrer init value of /relative/ressource and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrer init value of http://web-platform.test:8000/relative/ressource?query=true#fragment and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrer init value of http://web-platform.test:8000/ and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrer init value of about:client and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrer init value of and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrerPolicy init value of and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrerPolicy init value of no-referrer and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrerPolicy init value of no-referrer-when-downgrade and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrerPolicy init value of origin and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrerPolicy init value of origin-when-cross-origin and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check referrerPolicy init value of unsafe-url and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check mode init value of same-origin and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check mode init value of no-cors and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check mode init value of cors and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check credentials init value of omit and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check credentials init value of same-origin and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check credentials init value of include and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check cache init value of default and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check cache init value of no-store and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check cache init value of reload and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check cache init value of no-cache and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check cache init value of force-cache and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check redirect init value of follow and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check redirect init value of error and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check redirect init value of manual and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check integrity init value of and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check integrity init value of AZERTYUIOP1234567890 and associated getter]
|
||||
expected: FAIL
|
||||
|
||||
[Check window init value of null and associated getter]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[request-init-002.html]
|
||||
type: testharness
|
||||
[Initialize Request with headers values]
|
||||
expected: FAIL
|
||||
|
||||
[Initialize Request's body with undefined]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[request-init-003.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,3 @@
|
|||
[request-structure.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,5 @@
|
|||
[response-cancel-stream.html]
|
||||
type: testharness
|
||||
[Cancelling a starting blob Response stream]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[response-clone.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,5 @@
|
|||
[response-consume-empty.html]
|
||||
type: testharness
|
||||
[Consume response's body as text]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-consume-stream.html]
|
||||
type: testharness
|
||||
[Read empty text response's body as readableStream]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-consume.html]
|
||||
type: testharness
|
||||
[Consume response's body as text]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
[response-error.html]
|
||||
type: testharness
|
||||
[Throws RangeError when responseInit's status is 0]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 100]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 199]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 600]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 1000]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when responseInit's statusText is \n]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when responseInit's statusText is Ā]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when building a response with body and a body status of 204]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when building a response with body and a body status of 205]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when building a response with body and a body status of 304]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[response-idl.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,3 @@
|
|||
[response-init-001.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,8 @@
|
|||
[response-init-002.html]
|
||||
type: testharness
|
||||
[Initialize Response with headers values]
|
||||
expected: FAIL
|
||||
|
||||
[Initialize Response's body with application/octet-binary]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-static-error.html]
|
||||
type: testharness
|
||||
[Check response returned by static method error()]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
[response-static-redirect.html]
|
||||
type: testharness
|
||||
[Check default redirect response]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 301]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 302]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 303]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 307]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 308]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid url to redirect()]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 200]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 309]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 400]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 500]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-stream-disturbed-1.html]
|
||||
type: testharness
|
||||
[Getting blob after getting the Response body - not disturbed, not locked]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-stream-disturbed-2.html]
|
||||
type: testharness
|
||||
[Getting blob after getting a locked Response body]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-stream-disturbed-3.html]
|
||||
type: testharness
|
||||
[Getting blob after reading the Response body]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-stream-disturbed-4.html]
|
||||
type: testharness
|
||||
[Getting blob after cancelling the Response body]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[response-stream-disturbed-5.html]
|
||||
type: testharness
|
||||
[Getting a body reader after consuming as blob]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue