Skip to content

Commit 254badd

Browse files
avivkellerruyadorno
authored andcommitted
test: update compression wpt
PR-URL: #55191 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent c0614dc commit 254badd

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

test/fixtures/wpt/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run.
1111
Last update:
1212

1313
- common: https://github.com/web-platform-tests/wpt/tree/dbd648158d/common
14-
- compression: https://github.com/web-platform-tests/wpt/tree/5aa50dd415/compression
14+
- compression: https://github.com/web-platform-tests/wpt/tree/da8d6860b2/compression
1515
- console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console
1616
- dom/abort: https://github.com/web-platform-tests/wpt/tree/0143fe244b/dom/abort
1717
- dom/events: https://github.com/web-platform-tests/wpt/tree/0a811c5161/dom/events

test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const bufferSourceChunksForDeflate = [
4949
},
5050
{
5151
name: 'Float16Array',
52-
value: new Float16Array(new Uint8Array(compressedBytesWithDeflate).buffer)
52+
value: () => new Float16Array(new Uint8Array(compressedBytesWithDeflate).buffer)
5353
},
5454
{
5555
name: 'Float32Array',
@@ -100,7 +100,7 @@ const bufferSourceChunksForGzip = [
100100
},
101101
{
102102
name: 'Float16Array',
103-
value: new Float16Array(new Uint8Array(compressedBytesWithGzip).buffer)
103+
value: () => new Float16Array(new Uint8Array(compressedBytesWithGzip).buffer)
104104
},
105105
{
106106
name: 'Float32Array',
@@ -151,7 +151,7 @@ const bufferSourceChunksForDeflateRaw = [
151151
},
152152
{
153153
name: 'Float16Array',
154-
value: new Float16Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer)
154+
value: () => new Float16Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer)
155155
},
156156
{
157157
name: 'Float32Array',
@@ -172,7 +172,7 @@ for (const chunk of bufferSourceChunksForDeflate) {
172172
const ds = new DecompressionStream('deflate');
173173
const reader = ds.readable.getReader();
174174
const writer = ds.writable.getWriter();
175-
const writePromise = writer.write(chunk.value);
175+
const writePromise = writer.write(typeof chunk.value === 'function' ? chunk.value() : chunk.value);
176176
writer.close();
177177
const { value } = await reader.read();
178178
assert_array_equals(Array.from(value), deflateExpectedChunkValue, 'value should match');
@@ -184,7 +184,7 @@ for (const chunk of bufferSourceChunksForGzip) {
184184
const ds = new DecompressionStream('gzip');
185185
const reader = ds.readable.getReader();
186186
const writer = ds.writable.getWriter();
187-
const writePromise = writer.write(chunk.value);
187+
const writePromise = writer.write(typeof chunk.value === 'function' ? chunk.value() : chunk.value);
188188
writer.close();
189189
const { value } = await reader.read();
190190
assert_array_equals(Array.from(value), gzipExpectedChunkValue, 'value should match');
@@ -196,7 +196,7 @@ for (const chunk of bufferSourceChunksForDeflateRaw) {
196196
const ds = new DecompressionStream('deflate-raw');
197197
const reader = ds.readable.getReader();
198198
const writer = ds.writable.getWriter();
199-
const writePromise = writer.write(chunk.value);
199+
const writePromise = writer.write(typeof chunk.value === 'function' ? chunk.value() : chunk.value);
200200
writer.close();
201201
const { value } = await reader.read();
202202
assert_array_equals(Array.from(value), deflateRawExpectedChunkValue, 'value should match');

test/fixtures/wpt/versions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"path": "common"
55
},
66
"compression": {
7-
"commit": "5aa50dd4151b5bc1d04d5505366c6e27df30af5b",
7+
"commit": "da8d6860b22271d8ef4dc7894509692aaab9adf8",
88
"path": "compression"
99
},
1010
"console": {

0 commit comments

Comments
 (0)