Automatic update from web-platform-tests Remove ShadowRealm test coverage This intentionally does not make infrastructure or documentation changes, but without implementer support all the ShadowRealm tests add significant noise. Once there is implementer support this can be reverted. -- wpt-commits: e4a4672e9e607fc2b28e7173b83ce4e38ef53071 wpt-pr: 59794
21 lines
760 B
JavaScript
21 lines
760 B
JavaScript
// META: global=window,worker
|
|
// META: script=resources/decompression-input.js
|
|
|
|
'use strict';
|
|
|
|
const tests = compressedBytes.map(
|
|
([format, chunk]) => [format, new Uint8Array([...chunk, 0])]
|
|
);
|
|
|
|
for (const [format, chunk] of tests) {
|
|
promise_test(async t => {
|
|
const ds = new DecompressionStream(format);
|
|
const reader = ds.readable.getReader();
|
|
const writer = ds.writable.getWriter();
|
|
writer.write(chunk).catch(() => { });
|
|
const { done, value } = await reader.read();
|
|
assert_array_equals(Array.from(value), expectedChunkValue, "value should match");
|
|
await promise_rejects_js(t, TypeError, reader.read(), "Extra input should eventually throw");
|
|
}, `decompressing ${format} input with extra pad should still give the output`);
|
|
}
|