Update web-platform-tests to revision b'c9946198c9ee19db3b4974a388fae45da844a94a'

This commit is contained in:
WPT Sync Bot 2023-05-14 01:35:09 +00:00
parent 8dfd613aa1
commit 06e9d5a631
366 changed files with 8783 additions and 2336 deletions

View file

@ -79,3 +79,18 @@ promise_test(async function () {
}
)
}, "Check static json() propagates JSON serializer errors");
const encodingChecks = [
["𝌆", [34, 240, 157, 140, 134, 34]],
["\uDF06\uD834", [34, 92, 117, 100, 102, 48, 54, 92, 117, 100, 56, 51, 52, 34]],
["\uDEAD", [34, 92, 117, 100, 101, 97, 100, 34]],
];
for (const [input, expected] of encodingChecks) {
promise_test(async function () {
const response = Response.json(input);
const buffer = await response.arrayBuffer();
const data = new Uint8Array(buffer);
assert_array_equals(data, expected);
}, `Check response returned by static json() with input ${input}`);
}