Skip to content

Commit 5f17d8c

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

File tree

92 files changed

+2688
-1488
lines changed

Some content is hidden

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

92 files changed

+2688
-1488
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/fetch-later/resources/fetch-later-helper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,10 @@ class FetchLaterIframeExpectation {
415415
}
416416
if (e.data.type === FetchLaterIframeMessageType.ERROR) {
417417
const actual = e.data.error.name || e.data.error.type;
418-
if (e.data.error.constructor.name === 'DOMException' &&
418+
if (this.expectedDomErrorName === 'QuotaExceededError') {
419+
return actual == this.expectedDomErrorName;
420+
} else if (
421+
e.data.error.constructor.name === 'DOMException' &&
419422
actual == this.expectedDomErrorName) {
420423
return true;
421424
}

test/fixtures/wpt/fetch/fetch-later/resources/fetch-later.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
fetchLater(TARGET_URL, REQUEST_INIT);
3131
postMessageBack({type: FetchLaterIframeMessageType.DONE});
3232
} catch (e) {
33+
if (e.name == "QuotaExceededError" &&
34+
e instanceof DOMException) {
35+
// PostMessage is unable to serialize the QuotExceededError object.
36+
// Therefore do basic checks here and pass error name if successful.
37+
e = {name: e.name};
38+
}
3339
postMessageBack({type: FetchLaterIframeMessageType.ERROR, error: e});
3440
}
3541
</script>

0 commit comments

Comments
 (0)