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

This commit is contained in:
WPT Sync Bot 2022-11-10 01:22:36 +00:00
parent ace9b32b1c
commit df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions

View file

@ -4,6 +4,10 @@
const compressedBytesWithDeflate = new Uint8Array([120, 156, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 48, 173, 6, 36]);
const compressedBytesWithGzip = new Uint8Array([31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 176, 1, 57, 179, 15, 0, 0, 0]);
const compressedBytesWithDeflateRaw = new Uint8Array([
0x4b, 0xad, 0x28, 0x48, 0x4d, 0x2e, 0x49, 0x4d, 0x51, 0xc8,
0x2f, 0x2d, 0x29, 0x28, 0x2d, 0x01, 0x00,
]);
const expectedChunkValue = new TextEncoder().encode('expected output');
async function decompressArrayBuffer(input, format, chunkSize) {
@ -41,4 +45,9 @@ for (let chunkSize = 1; chunkSize < 16; ++chunkSize) {
const decompressedData = await decompressArrayBuffer(compressedBytesWithGzip, 'gzip', chunkSize);
assert_array_equals(decompressedData, expectedChunkValue, "value should match");
}, `decompressing splitted chunk into pieces of size ${chunkSize} should work in gzip`);
promise_test(async t => {
const decompressedData = await decompressArrayBuffer(compressedBytesWithDeflateRaw, 'deflate-raw', chunkSize);
assert_array_equals(decompressedData, expectedChunkValue, "value should match");
}, `decompressing splitted chunk into pieces of size ${chunkSize} should work in deflate-raw`);
}