diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/wasm/webapi/esm-integration/resources | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/wasm/webapi/esm-integration/resources')
35 files changed, 45 insertions, 0 deletions
diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/execute-start.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/execute-start.wasm Binary files differnew file mode 100644 index 0000000000..ecfdda1f9a --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/execute-start.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/exported-names.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/exported-names.wasm Binary files differnew file mode 100644 index 0000000000..ebffad193c --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/exported-names.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/invalid-bytecode.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/invalid-bytecode.wasm Binary files differnew file mode 100644 index 0000000000..1ae8b721f3 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/invalid-bytecode.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/invalid-module.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/invalid-module.wasm Binary files differnew file mode 100644 index 0000000000..dd711f0953 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/invalid-module.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-function-error.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-function-error.js new file mode 100644 index 0000000000..06cb8a0ad9 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-function-error.js @@ -0,0 +1,2 @@ +export const func = 42; +import { f } from "./js-wasm-cycle-function-error.wasm"; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-function-error.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-function-error.wasm Binary files differnew file mode 100644 index 0000000000..b89d94dde7 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-function-error.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-global.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-global.js new file mode 100644 index 0000000000..1f375b8ce1 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-global.js @@ -0,0 +1,2 @@ +export const glob = new WebAssembly.Global({ value: "i32" }, 42); +import { f } from "./js-wasm-cycle-global.wasm"; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-global.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-global.wasm Binary files differnew file mode 100644 index 0000000000..2a9017f87b --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-global.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-memory.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-memory.js new file mode 100644 index 0000000000..92e37a86ac --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-memory.js @@ -0,0 +1,2 @@ +export const mem = new WebAssembly.Memory({ initial: 10 }); +import { f } from "./js-wasm-cycle-memory.wasm"; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-memory.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-memory.wasm Binary files differnew file mode 100644 index 0000000000..e699a9b3c4 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-memory.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-table.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-table.js new file mode 100644 index 0000000000..5d6794489f --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-table.js @@ -0,0 +1,2 @@ +export const tab = new WebAssembly.Table({ element: "anyfunc" }); +import { f } from "./js-wasm-cycle-table.wasm"; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-table.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-table.wasm Binary files differnew file mode 100644 index 0000000000..ec4883e652 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-table.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-value.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-value.js new file mode 100644 index 0000000000..f7b0d62080 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-value.js @@ -0,0 +1,2 @@ +export const val = 42; +import { f } from "./js-wasm-cycle-value.wasm"; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-value.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-value.wasm Binary files differnew file mode 100644 index 0000000000..083409e260 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle-value.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle.js new file mode 100644 index 0000000000..8ee579e2ad --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle.js @@ -0,0 +1,13 @@ +function f() { return 42; } +export { f }; + +import { mem, tab, glob, func } from "./js-wasm-cycle.wasm"; +assert_true(glob instanceof WebAssembly.Global); +assert_equals(glob.valueOf(), 1); +assert_true(mem instanceof WebAssembly.Memory); +assert_true(tab instanceof WebAssembly.Table); +assert_true(func instanceof Function); + +f = () => { return 24 }; + +assert_equals(func(), 42); diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle.wasm Binary files differnew file mode 100644 index 0000000000..77a3b86ab6 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/js-wasm-cycle.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/log.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/log.js new file mode 100644 index 0000000000..0c4f5ed519 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/log.js @@ -0,0 +1 @@ +export function logExec() { log.push("executed"); } diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/resolve-export.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/resolve-export.wasm Binary files differnew file mode 100644 index 0000000000..d8fc92d022 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/resolve-export.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-export-i64-global.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-export-i64-global.wasm Binary files differnew file mode 100644 index 0000000000..f9f0cf2799 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-export-i64-global.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-export-to-wasm.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-export-to-wasm.wasm Binary files differnew file mode 100644 index 0000000000..0ee948f96f --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-export-to-wasm.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-error-from-wasm.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-error-from-wasm.wasm Binary files differnew file mode 100644 index 0000000000..c27bcb068d --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-error-from-wasm.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-from-wasm.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-from-wasm.wasm Binary files differnew file mode 100644 index 0000000000..652ff14310 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-from-wasm.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-func.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-func.js new file mode 100644 index 0000000000..78982c32dc --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-func.js @@ -0,0 +1 @@ +export let f = 5; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-func.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-func.wasm Binary files differnew file mode 100644 index 0000000000..2f23c58520 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-func.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-global.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-global.js new file mode 100644 index 0000000000..4258cd2d7d --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-global.js @@ -0,0 +1 @@ +export let g = 5; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-global.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-global.wasm Binary files differnew file mode 100644 index 0000000000..2f8bd77940 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-global.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-memory.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-memory.js new file mode 100644 index 0000000000..4cee889838 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-memory.js @@ -0,0 +1 @@ +export let m = 5; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-memory.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-memory.wasm Binary files differnew file mode 100644 index 0000000000..d9474047cd --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-memory.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-table.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-table.js new file mode 100644 index 0000000000..ca823646cb --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-table.js @@ -0,0 +1 @@ +export let t = 5; diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-table.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-table.wasm Binary files differnew file mode 100644 index 0000000000..8ccc8be7f2 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-import-table.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.js new file mode 100644 index 0000000000..161edab4f6 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.js @@ -0,0 +1,15 @@ +import * as mod from "./wasm-js-cycle.wasm"; + +let jsGlob = new WebAssembly.Global({ value: "i32", mutable: true }, 42); +let jsMem = new WebAssembly.Memory({ initial: 10 }); +let jsTab = new WebAssembly.Table({ initial: 10, element: "anyfunc" }); +let jsFunc = () => { return 42; }; + +export { jsGlob, jsMem, jsTab, jsFunc }; + +export function mutateBindings() { + jsGlob = 0; + jsMem = 0; + jsTab = 0; + jsFunc = 0; +} diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.wasm Binary files differnew file mode 100644 index 0000000000..b700377b27 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.wasm diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker-helper.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker-helper.js new file mode 100644 index 0000000000..277bb4c1ea --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker-helper.js @@ -0,0 +1 @@ +export function pm(x) { postMessage(x); } diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker.js b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker.js new file mode 100644 index 0000000000..c72464f71a --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker.js @@ -0,0 +1 @@ +import * as mod from "./worker.wasm" diff --git a/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker.wasm b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker.wasm Binary files differnew file mode 100644 index 0000000000..e942dc54ac --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/esm-integration/resources/worker.wasm |