tor-browser

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

toString.any.js (755B)


      1 // META: global=window,dedicatedworker,jsshell
      2 
      3 test(() => {
      4  const argument = { "initial": 0 };
      5  const memory = new WebAssembly.Memory(argument);
      6  assert_class_string(memory, "WebAssembly.Memory");
      7 }, "Object.prototype.toString on an Memory");
      8 
      9 test(() => {
     10  assert_own_property(WebAssembly.Memory.prototype, Symbol.toStringTag);
     11 
     12  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Memory.prototype, Symbol.toStringTag);
     13  assert_equals(propDesc.value, "WebAssembly.Memory", "value");
     14  assert_equals(propDesc.configurable, true, "configurable");
     15  assert_equals(propDesc.enumerable, false, "enumerable");
     16  assert_equals(propDesc.writable, false, "writable");
     17 }, "@@toStringTag exists on the prototype with the appropriate descriptor");