From 9ba339119a0395da9dbbd2330a309ab8b8baf358 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Fri, 11 Oct 2024 15:26:47 -0400 Subject: [PATCH] test: update `compression` wpt PR-URL: https://github.com/nodejs/node/pull/55191 Reviewed-By: Luigi Pinca --- test/fixtures/wpt/README.md | 2 +- .../decompression-buffersource.tentative.any.js | 12 ++++++------ test/fixtures/wpt/versions.json | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 2c8a8b9b03afa9..fe5486edb75474 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -11,7 +11,7 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run. Last update: - common: https://github.com/web-platform-tests/wpt/tree/dbd648158d/common -- compression: https://github.com/web-platform-tests/wpt/tree/5aa50dd415/compression +- compression: https://github.com/web-platform-tests/wpt/tree/da8d6860b2/compression - console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console - dom/abort: https://github.com/web-platform-tests/wpt/tree/0143fe244b/dom/abort - dom/events: https://github.com/web-platform-tests/wpt/tree/0a811c5161/dom/events diff --git a/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js b/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js index abb51751c8b4a3..f4316ba1fc876e 100644 --- a/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js +++ b/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js @@ -49,7 +49,7 @@ const bufferSourceChunksForDeflate = [ }, { name: 'Float16Array', - value: new Float16Array(new Uint8Array(compressedBytesWithDeflate).buffer) + value: () => new Float16Array(new Uint8Array(compressedBytesWithDeflate).buffer) }, { name: 'Float32Array', @@ -100,7 +100,7 @@ const bufferSourceChunksForGzip = [ }, { name: 'Float16Array', - value: new Float16Array(new Uint8Array(compressedBytesWithGzip).buffer) + value: () => new Float16Array(new Uint8Array(compressedBytesWithGzip).buffer) }, { name: 'Float32Array', @@ -151,7 +151,7 @@ const bufferSourceChunksForDeflateRaw = [ }, { name: 'Float16Array', - value: new Float16Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + value: () => new Float16Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) }, { name: 'Float32Array', @@ -172,7 +172,7 @@ for (const chunk of bufferSourceChunksForDeflate) { const ds = new DecompressionStream('deflate'); const reader = ds.readable.getReader(); const writer = ds.writable.getWriter(); - const writePromise = writer.write(chunk.value); + const writePromise = writer.write(typeof chunk.value === 'function' ? chunk.value() : chunk.value); writer.close(); const { value } = await reader.read(); assert_array_equals(Array.from(value), deflateExpectedChunkValue, 'value should match'); @@ -184,7 +184,7 @@ for (const chunk of bufferSourceChunksForGzip) { const ds = new DecompressionStream('gzip'); const reader = ds.readable.getReader(); const writer = ds.writable.getWriter(); - const writePromise = writer.write(chunk.value); + const writePromise = writer.write(typeof chunk.value === 'function' ? chunk.value() : chunk.value); writer.close(); const { value } = await reader.read(); assert_array_equals(Array.from(value), gzipExpectedChunkValue, 'value should match'); @@ -196,7 +196,7 @@ for (const chunk of bufferSourceChunksForDeflateRaw) { const ds = new DecompressionStream('deflate-raw'); const reader = ds.readable.getReader(); const writer = ds.writable.getWriter(); - const writePromise = writer.write(chunk.value); + const writePromise = writer.write(typeof chunk.value === 'function' ? chunk.value() : chunk.value); writer.close(); const { value } = await reader.read(); assert_array_equals(Array.from(value), deflateRawExpectedChunkValue, 'value should match'); diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index a93ad1762feb80..bc907734cdb7c9 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -4,7 +4,7 @@ "path": "common" }, "compression": { - "commit": "5aa50dd4151b5bc1d04d5505366c6e27df30af5b", + "commit": "da8d6860b22271d8ef4dc7894509692aaab9adf8", "path": "compression" }, "console": {