tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

toString.any.js (919B)


      1 // META: global=window,dedicatedworker,jsshell,shadowrealm
      2 // META: script=/wasm/jsapi/wasm-module-builder.js
      3 
      4 test(() => {
      5  const emptyModuleBinary = new WasmModuleBuilder().toBuffer();
      6  const module = new WebAssembly.Module(emptyModuleBinary);
      7  const instance = new WebAssembly.Instance(module);
      8  assert_class_string(instance, "WebAssembly.Instance");
      9 }, "Object.prototype.toString on an Instance");
     10 
     11 test(() => {
     12  assert_own_property(WebAssembly.Instance.prototype, Symbol.toStringTag);
     13 
     14  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Instance.prototype, Symbol.toStringTag);
     15  assert_equals(propDesc.value, "WebAssembly.Instance", "value");
     16  assert_equals(propDesc.configurable, true, "configurable");
     17  assert_equals(propDesc.enumerable, false, "enumerable");
     18  assert_equals(propDesc.writable, false, "writable");
     19 }, "@@toStringTag exists on the prototype with the appropriate descriptor");