Skip to content

Commit a4a0784

Browse files
metcoder95github-actions[bot]
authored andcommitted
chore: update WPT
1 parent 6211fac commit a4a0784

File tree

84 files changed

+2601
-1469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2601
-1469
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
features:
2+
- name: fetch-request-streams
3+
files:
4+
- request-upload*

test/fixtures/wpt/fetch/api/body/mime-type.any.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
[
8989
() => new Request("about:blank", { method: "POST", body: new Blob([""], { type: "Text/Plain" }), headers: [["Content-Type", "Text/Html"]] }),
90-
() => new Response(new Blob([""], { type: "Text/Plain" }, { headers: [["Content-Type", "Text/Html"]] }))
90+
() => new Response(new Blob([""], { type: "Text/Plain" }), { headers: [["Content-Type", "Text/Html"]] })
9191
].forEach(bodyContainerCreator => {
9292
const bodyContainer = bodyContainerCreator();
9393
const cloned = bodyContainer.clone();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
features:
2+
- name: fetch-priority
3+
files:
4+
- request-init-priority.any.js

test/fixtures/wpt/fetch/api/resources/keepalive-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function assertStashedTokenAsync(
117117
*
118118
* `unloadIframe` to unload the iframe before verifying stashed token to
119119
* simulate the situation that unloads after fetching. Note that this test is
120-
* different from `keepaliveRedirectInUnloadTest()` in that the the latter
120+
* different from `keepaliveRedirectInUnloadTest()` in that the latter
121121
* performs fetch() call directly in `unload` event handler, while this test
122122
* does it in `load`.
123123
*/

test/fixtures/wpt/fetch/content-encoding/br/bad-br-body.https.any.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
[
44
"arrayBuffer",
5+
"blob",
6+
"bytes",
7+
"formData",
8+
"json",
9+
"text"
510
].forEach(method => {
611
promise_test(t => {
712
return fetch("resources/bad-br-body.py").then(res => {

test/fixtures/wpt/fetch/content-encoding/gzip/bad-gzip-body.any.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ promise_test((test) => {
99
[
1010
"arrayBuffer",
1111
"blob",
12+
"bytes",
1213
"formData",
1314
"json",
1415
"text"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
features:
2+
- name: zstd
3+
files: "**"

test/fixtures/wpt/fetch/content-encoding/zstd/bad-zstd-body.https.any.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ promise_test((test) => {
99
[
1010
"arrayBuffer",
1111
"blob",
12+
"bytes",
1213
"formData",
1314
"json",
1415
"text"

test/fixtures/wpt/fetch/http-cache/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ Possible members of a request object:
6262
- expected_response_headers - An array of `[header_name_string, header_value_string]` representing
6363
headers to check the response for. See also response_headers.
6464
- expected_response_text - A string to check the response body against. If not present, `response_body` will be checked if present and non-null; otherwise the response body will be checked for the test uuid (unless the status code disallows a body). Set to `null` to disable all response body checking.
65+
- url_params - A string of url parameters that will be appended to the end of the url, separated by "&" and without leading "&".
6566

6667
Some headers in `response_headers` are treated specially:
6768

6869
* For date-carrying headers, if the value is a number, it will be interpreted as a delta to the time of the first request at the server.
6970
* For URL-carrying headers, the value will be appended as a query parameter for `target`.
7071

7172
See the source for exact details.
72-

test/fixtures/wpt/fetch/http-cache/heuristic.any.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,33 @@ var tests = [
3232
],
3333
},
3434
{
35-
expected_type: "not_cached"
35+
expected_type: "not_cached",
3636
}
3737
]
38-
}
38+
},
39+
{
40+
name: "HTTP cache does not reuse a redirected response with no max-age and no Last-Modified header",
41+
requests: [
42+
{
43+
response_status: [301, "Moved Permanently"],
44+
response_headers: [
45+
["Cache-Control", "private"],
46+
["Location", "redirect_target"]
47+
],
48+
},
49+
{ skip: true}, // Response to first redirect
50+
{
51+
response_status: [301, "Moved Permanently"],
52+
response_headers: [
53+
["Cache-Control", "private"],
54+
["Location", "redirect_target"]
55+
],
56+
expected_type: "not_cached",
57+
},
58+
{ skip: true}, // response to second redirect
59+
],
60+
check_count: true,
61+
},
3962
];
4063

4164
function check_status(status) {

0 commit comments

Comments
 (0)