tor-browser

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

toString.any.js (854B)


      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  assert_class_string(module, "WebAssembly.Module");
      8 }, "Object.prototype.toString on an Module");
      9 
     10 test(() => {
     11  assert_own_property(WebAssembly.Module.prototype, Symbol.toStringTag);
     12 
     13  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Module.prototype, Symbol.toStringTag);
     14  assert_equals(propDesc.value, "WebAssembly.Module", "value");
     15  assert_equals(propDesc.configurable, true, "configurable");
     16  assert_equals(propDesc.enumerable, false, "enumerable");
     17  assert_equals(propDesc.writable, false, "writable");
     18 }, "@@toStringTag exists on the prototype with the appropriate descriptor");