Title: [214260] trunk/JSTests
Revision
214260
Author
jfbast...@apple.com
Date
2017-03-22 10:54:36 -0700 (Wed, 22 Mar 2017)

Log Message

WebAssembly: test module namespace object for WebAssembly.Instance
https://bugs.webkit.org/show_bug.cgi?id=169951

Reviewed by Saam Barati.

* wasm/js-api/test_basic_api.js:
(const.c.in.constructorProperties.switch):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (214259 => 214260)


--- trunk/JSTests/ChangeLog	2017-03-22 17:52:55 UTC (rev 214259)
+++ trunk/JSTests/ChangeLog	2017-03-22 17:54:36 UTC (rev 214260)
@@ -1,5 +1,15 @@
 2017-03-22  JF Bastien  <jfbast...@apple.com>
 
+        WebAssembly: test module namespace object for WebAssembly.Instance
+        https://bugs.webkit.org/show_bug.cgi?id=169951
+
+        Reviewed by Saam Barati.
+
+        * wasm/js-api/test_basic_api.js:
+        (const.c.in.constructorProperties.switch):
+
+2017-03-22  JF Bastien  <jfbast...@apple.com>
+
         WebAssembly: constructors without new don't throw
         https://bugs.webkit.org/show_bug.cgi?id=165995
 

Modified: trunk/JSTests/wasm/js-api/test_basic_api.js (214259 => 214260)


--- trunk/JSTests/wasm/js-api/test_basic_api.js	2017-03-22 17:52:55 UTC (rev 214259)
+++ trunk/JSTests/wasm/js-api/test_basic_api.js	2017-03-22 17:54:36 UTC (rev 214260)
@@ -72,11 +72,13 @@
             assert.throws(() => new WebAssembly[c](new WebAssembly.Module(emptyModuleArray), invalid), TypeError, `second argument to WebAssembly.Instance must be undefined or an Object (evaluating 'new WebAssembly[c](new WebAssembly.Module(emptyModuleArray), invalid)')`);
         assert.isNotUndef(instance.exports);
         checkOwnPropertyDescriptor(instance, "exports", { typeofvalue: "object", writable: true, configurable: true, enumerable: true });
-        // FIXME these should pass, requires a module namespace object. https://bugs.webkit.org/show_bug.cgi?id=165121
-        // assert.isUndef(instance.exports.__proto__);
-        // assert.eq(Reflect.isExtensible(instance.exports), false);
-        // assert.eq(Symbol.iterator in instance.exports, true);
-        // assert.eq(Symbol.toStringTag in instance.exports, true);
+        assert.isUndef(instance.exports.__proto__);
+        assert.eq(Reflect.isExtensible(instance.exports), false);
+        assert.eq(Symbol.iterator in instance.exports, false);
+        assert.eq(Symbol.toStringTag in instance.exports, true);
+        assert.eq(Object.getOwnPropertySymbols(instance.exports).length, 1);
+        assert.eq(Object.getOwnPropertySymbols(instance.exports)[0], Symbol.toStringTag);
+        assert.throws(() => instance.exports[Symbol.toStringTag] = 42, TypeError, `Attempted to assign to readonly property.`);
         break;
     case "Memory":
         new WebAssembly.Memory({initial: 20});
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to