mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Don't lose information in Fetch API
Also update test expectations.
This commit is contained in:
parent
f838944332
commit
0f1eb13e33
23 changed files with 45 additions and 259 deletions
|
@ -32,7 +32,7 @@ fn assert_parse(url: &'static str,
|
|||
assert_eq!(header_content_type, content_type.as_ref());
|
||||
|
||||
let metadata = match response.metadata() {
|
||||
Ok(FetchMetadata::Filtered { filtered: FilteredMetadata::Transparent(m), .. }) => m,
|
||||
Ok(FetchMetadata::Filtered { filtered: FilteredMetadata::Basic(m), .. }) => m,
|
||||
result => panic!(result),
|
||||
};
|
||||
assert_eq!(metadata.content_type.map(Serde::into_inner), content_type);
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
[accept-header-worker.html]
|
||||
type: testharness
|
||||
[Request through fetch should have 'accept' header with value '*/*']
|
||||
expected: FAIL
|
||||
|
||||
[Request through fetch should have 'accept' header with value 'custom/*']
|
||||
expected: FAIL
|
||||
|
||||
[Request through fetch should have a 'accept-language' header]
|
||||
expected: FAIL
|
||||
|
||||
[Request through fetch should have 'accept-language' header with value 'bzh']
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
[accept-header.html]
|
||||
type: testharness
|
||||
[Request through fetch should have 'accept' header with value '*/*']
|
||||
expected: FAIL
|
||||
|
||||
[Request through fetch should have 'accept' header with value 'custom/*']
|
||||
expected: FAIL
|
||||
|
||||
[Request through fetch should have a 'accept-language' header]
|
||||
expected: FAIL
|
||||
|
||||
[Request through fetch should have 'accept-language' header with value 'bzh']
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
[mode-no-cors-worker.html]
|
||||
type: testharness
|
||||
[Fetch ../resources/top.txt with no-cors mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch http://web-platform.test:8000/fetch/api/resources/top.txt with no-cors mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch https://web-platform.test:8443/fetch/api/resources/top.txt with no-cors mode]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
[mode-no-cors.html]
|
||||
type: testharness
|
||||
[Fetch ../resources/top.txt with no-cors mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch http://web-platform.test:8000/fetch/api/resources/top.txt with no-cors mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch https://web-platform.test:8443/fetch/api/resources/top.txt with no-cors mode]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
[mode-same-origin-worker.html]
|
||||
type: testharness
|
||||
[Fetch ../resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch http://web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch /fetch/api/basic/../resources/redirect.py?location=../resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch /fetch/api/basic/../resources/redirect.py?location=http://web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
[mode-same-origin.html]
|
||||
type: testharness
|
||||
[Fetch ../resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch http://web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch /fetch/api/basic/../resources/redirect.py?location=../resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch /fetch/api/basic/../resources/redirect.py?location=http://web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
[request-forbidden-headers-worker.html]
|
||||
type: testharness
|
||||
[Accept-Charset is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Accept-Encoding is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -12,63 +9,3 @@
|
|||
[Access-Control-Request-Method is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Connection is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Content-Length is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Cookie is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Cookie2 is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Date is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[DNT is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Expect is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Host is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Keep-Alive is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Origin is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Referer is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[TE is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Trailer is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Transfer-Encoding is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Upgrade is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Via is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Proxy- is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Proxy-Test is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Sec- is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Sec-Test is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
[request-forbidden-headers.html]
|
||||
type: testharness
|
||||
[Accept-Charset is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Accept-Encoding is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -12,63 +9,3 @@
|
|||
[Access-Control-Request-Method is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Connection is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Content-Length is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Cookie is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Cookie2 is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Date is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[DNT is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Expect is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Host is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Keep-Alive is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Origin is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Referer is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[TE is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Trailer is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Transfer-Encoding is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Upgrade is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Via is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Proxy- is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Proxy-Test is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Sec- is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
[Sec-Test is a forbidden request header]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
[request-headers-worker.html]
|
||||
type: testharness
|
||||
[Fetch with GET]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with HEAD]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with PUT without body]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -54,9 +48,6 @@
|
|||
[Fetch with POST with URLSearchParams body]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with GET and mode "cors" does not need an Origin header]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with POST and mode "same-origin" needs an Origin header]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
[request-headers.html]
|
||||
type: testharness
|
||||
[Fetch with GET]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with HEAD]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with PUT without body]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -54,9 +48,6 @@
|
|||
[Fetch with POST with URLSearchParams body]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with GET and mode "cors" does not need an Origin header]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with POST and mode "same-origin" needs an Origin header]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[scheme-blob-worker.html]
|
||||
type: testharness
|
||||
[Fetching [GET\] URL.createObjectURL(blob) is OK]
|
||||
bug: https://github.com/servo/servo/issues/13766
|
||||
expected: FAIL
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[scheme-blob.html]
|
||||
type: testharness
|
||||
[Fetching [GET\] URL.createObjectURL(blob) is OK]
|
||||
bug: https://github.com/servo/servo/issues/13766
|
||||
expected: FAIL
|
||||
|
|
@ -9,12 +9,6 @@
|
|||
[Fetching data:,response%27s%20body is OK (cors)]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching data:text/plain;base64,cmVzcG9uc2UncyBib[...\] is OK]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching data:image/png;base64,cmVzcG9uc2UncyBib2[...\] is OK]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching [POST\] data:,response%27s%20body is OK]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -9,12 +9,6 @@
|
|||
[Fetching data:,response%27s%20body is OK (cors)]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching data:text/plain;base64,cmVzcG9uc2UncyBib[...\] is OK]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching data:image/png;base64,cmVzcG9uc2UncyBib2[...\] is OK]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching [POST\] data:,response%27s%20body is OK]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
[cookies-worker.html]
|
||||
type: testharness
|
||||
[Include mode: 1 cookie]
|
||||
expected: FAIL
|
||||
|
||||
[Include mode: 2 cookies]
|
||||
expected: FAIL
|
||||
|
||||
[Omit mode: discard cookies]
|
||||
expected: FAIL
|
||||
|
||||
[Omit mode: no cookie is stored]
|
||||
expected: FAIL
|
||||
|
||||
[Omit mode: no cookie is sent]
|
||||
expected: FAIL
|
||||
|
||||
[Same-origin mode: 1 cookie]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
[cookies.html]
|
||||
type: testharness
|
||||
[Include mode: 1 cookie]
|
||||
expected: FAIL
|
||||
|
||||
[Include mode: 2 cookies]
|
||||
expected: FAIL
|
||||
|
||||
[Omit mode: discard cookies]
|
||||
expected: FAIL
|
||||
|
||||
[Omit mode: no cookie is stored]
|
||||
expected: FAIL
|
||||
|
||||
[Omit mode: no cookie is sent]
|
||||
expected: FAIL
|
||||
|
||||
[Same-origin mode: 1 cookie]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[referrer-no-referrer-worker.html]
|
||||
type: testharness
|
||||
[Request's referrer is empty]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[referrer-no-referrer.html]
|
||||
type: testharness
|
||||
[Request's referrer is empty]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue