From 9dc2b0bba3ca7a94737e2e01cb4143a46206b45b Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Fri, 29 Mar 2024 17:48:51 +0100 Subject: [PATCH] LibWeb: Add a basic test for [EnforceRange] This is a basic test - but does cover the two bugs in the previous two commits. --- .../Text/expected/Wasm/WebAssembly-grow.txt | 3 +++ .../Text/input/Wasm/WebAssembly-grow.html | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/Wasm/WebAssembly-grow.txt create mode 100644 Tests/LibWeb/Text/input/Wasm/WebAssembly-grow.html diff --git a/Tests/LibWeb/Text/expected/Wasm/WebAssembly-grow.txt b/Tests/LibWeb/Text/expected/Wasm/WebAssembly-grow.txt new file mode 100644 index 00000000000..b8b0bd8b4ce --- /dev/null +++ b/Tests/LibWeb/Text/expected/Wasm/WebAssembly-grow.txt @@ -0,0 +1,3 @@ +Made memory [object WebAssembly.Memory] with buffer [object ArrayBuffer] (byteLength 655360) +After growing buffer (byteLength 983040) +Got error: 'RangeError: Number '4294967296' is outside of allowed range of 0 to 4294967295' diff --git a/Tests/LibWeb/Text/input/Wasm/WebAssembly-grow.html b/Tests/LibWeb/Text/input/Wasm/WebAssembly-grow.html new file mode 100644 index 00000000000..53f5d612efb --- /dev/null +++ b/Tests/LibWeb/Text/input/Wasm/WebAssembly-grow.html @@ -0,0 +1,19 @@ + +