mirror of
https://github.com/servo/servo.git
synced 2025-06-27 10:33:39 +01:00
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}.gz`);
|
|
assert_true(response.ok);
|
|
let arrayBuffer = await response.arrayBuffer()
|
|
let u8 = new Uint8Array(arrayBuffer);
|
|
assert_equals(u8.length, expectedDecompressedSize);
|
|
}, `fetched gzip data with content type ${contentType} should be decompressed.`);
|
|
});
|
|
|