Bug 1800771 [wpt PR 36978] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=247421, a=testonly

Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=247421 (#36978)

--

wpt-commits: 65ff691baccb6685d064fec044e44344488009af
wpt-pr: 36978
This commit is contained in:
Ryan Reno 2022-11-20 16:10:58 +00:00 committed by moz-wptsync-bot
parent 2279c9f305
commit f6926f7910
5 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,16 @@
// 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.`);
});

View File

@ -0,0 +1,2 @@
Content-type: application/octet-stream
Content-Encoding: gzip

View File

@ -0,0 +1,2 @@
Content-type: text/plain
Content-Encoding: gzip