mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Add tests for zstd content-encoding (#44393) * add zstd tests and separate into folders * add bad input tests and make window size test tentative * add https to bad input test -- wpt-commits: 2453380d880f99191dc00b14b4c183fe7364766b wpt-pr: 44393
16 lines
517 B
JavaScript
16 lines
517 B
JavaScript
// META: global=window,worker
|
|
|
|
const expectedDecompressedSize = 10500;
|
|
[
|
|
"text",
|
|
"octetstream"
|
|
].forEach(contentType => {
|
|
promise_test(async t => {
|
|
let response = await fetch(`resources/foo.${contentType}.zst`);
|
|
assert_true(response.ok);
|
|
let arrayBuffer = await response.arrayBuffer()
|
|
let u8 = new Uint8Array(arrayBuffer);
|
|
assert_equals(u8.length, expectedDecompressedSize);
|
|
}, `fetched zstd data with content type ${contentType} should be decompressed.`);
|
|
});
|