• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// META: global=window,dedicatedworker,jsshell
2
3test(() => {
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
9test(() => {
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");
18