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

Unified Diff: test/mjsunit/es6/collection-iterator.js

Issue 664333003: Add remaining @@toStringTag symbols to builtins (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make heap-snapshot-generator not explode Created 6 years, 2 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 | « test/mjsunit/es6/array-iterator.js ('k') | test/mjsunit/es6/json.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/collection-iterator.js
diff --git a/test/mjsunit/es6/collection-iterator.js b/test/mjsunit/es6/collection-iterator.js
index 5503fe58c0dfc51283bca3c073a70057835616a6..18b3f1a5e5ac27b185eafff45f47bda0cee60315 100644
--- a/test/mjsunit/es6/collection-iterator.js
+++ b/test/mjsunit/es6/collection-iterator.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --harmony-tostring
(function TestSetIterator() {
@@ -19,6 +19,15 @@
assertEquals(new Set().values().__proto__, SetIteratorPrototype);
assertEquals(new Set().entries().__proto__, SetIteratorPrototype);
+
+ assertEquals("[object Set Iterator]",
+ Object.prototype.toString.call(iter));
+ assertEquals("Set Iterator", SetIteratorPrototype[Symbol.toStringTag]);
+ var desc = Object.getOwnPropertyDescriptor(
+ SetIteratorPrototype, Symbol.toStringTag);
+ assertTrue(desc.configurable);
+ assertFalse(desc.writable);
+ assertEquals("Set Iterator", desc.value);
})();
@@ -120,6 +129,15 @@
assertEquals(new Map().values().__proto__, MapIteratorPrototype);
assertEquals(new Map().keys().__proto__, MapIteratorPrototype);
assertEquals(new Map().entries().__proto__, MapIteratorPrototype);
+
+ assertEquals("[object Map Iterator]",
+ Object.prototype.toString.call(iter));
+ assertEquals("Map Iterator", MapIteratorPrototype[Symbol.toStringTag]);
+ var desc = Object.getOwnPropertyDescriptor(
+ MapIteratorPrototype, Symbol.toStringTag);
+ assertTrue(desc.configurable);
+ assertFalse(desc.writable);
+ assertEquals("Map Iterator", desc.value);
})();
« no previous file with comments | « test/mjsunit/es6/array-iterator.js ('k') | test/mjsunit/es6/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698