From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../tests/wasm/jsapi/instance/toString.any.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testing/web-platform/tests/wasm/jsapi/instance/toString.any.js (limited to 'testing/web-platform/tests/wasm/jsapi/instance/toString.any.js') diff --git a/testing/web-platform/tests/wasm/jsapi/instance/toString.any.js b/testing/web-platform/tests/wasm/jsapi/instance/toString.any.js new file mode 100644 index 0000000000..547a9ca829 --- /dev/null +++ b/testing/web-platform/tests/wasm/jsapi/instance/toString.any.js @@ -0,0 +1,19 @@ +// META: global=window,dedicatedworker,jsshell +// META: script=/wasm/jsapi/wasm-module-builder.js + +test(() => { + const emptyModuleBinary = new WasmModuleBuilder().toBuffer(); + const module = new WebAssembly.Module(emptyModuleBinary); + const instance = new WebAssembly.Instance(module); + assert_class_string(instance, "WebAssembly.Instance"); +}, "Object.prototype.toString on an Instance"); + +test(() => { + assert_own_property(WebAssembly.Instance.prototype, Symbol.toStringTag); + + const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Instance.prototype, Symbol.toStringTag); + assert_equals(propDesc.value, "WebAssembly.Instance", "value"); + assert_equals(propDesc.configurable, true, "configurable"); + assert_equals(propDesc.enumerable, false, "enumerable"); + assert_equals(propDesc.writable, false, "writable"); +}, "@@toStringTag exists on the prototype with the appropriate descriptor"); -- cgit v1.2.3