Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: test/mjsunit/harmony/collections.js

Issue 19948002: Add test case for issue 2793 about experimental natives. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/collections.js
diff --git a/test/mjsunit/harmony/collections.js b/test/mjsunit/harmony/collections.js
index 67f91a8ad4a75f561771742b70565a490f52aa97..3e87e6b533bdea945ea775e1c625ce8ec912d185 100644
--- a/test/mjsunit/harmony/collections.js
+++ b/test/mjsunit/harmony/collections.js
@@ -288,6 +288,22 @@ assertEquals("WeakMap", WeakMap.name);
assertEquals("WeakSet", WeakSet.name);
+// Test prototype property of Set, Map, WeakMap and WeakSet.
+function TestPrototype(C) {
+ assertTrue(C.prototype instanceof Object);
+ assertEquals({
+ value: {},
+ writable: true, // TODO(2793): This should be non-writable.
+ enumerable: false,
+ configurable: false
+ }, Object.getOwnPropertyDescriptor(C, "prototype"));
+}
+TestPrototype(Set);
+TestPrototype(Map);
+TestPrototype(WeakMap);
+TestPrototype(WeakSet);
+
+
// Test constructor property of the Set, Map, WeakMap and WeakSet prototype.
function TestConstructor(C) {
assertFalse(C === Object.prototype.constructor);
@@ -301,6 +317,7 @@ TestConstructor(WeakMap);
TestConstructor(WeakSet);
+// Test the Set, Map, WeakMap and WeakSet global properties themselves.
function TestDescriptor(global, C) {
assertEquals({
value: C,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698