Files
Nidhi Jaju 6526a5f7f4 Bug 1878596 [wpt PR 44393] - Add tests for zstd content-encoding, a=testonly
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
2024-02-13 08:17:38 +00:00

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.`);
});