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

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

Issue 13880007: Fix set-up of intrinsics' 'constructor' properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « src/v8natives.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/symbols.js
diff --git a/test/mjsunit/harmony/symbols.js b/test/mjsunit/harmony/symbols.js
index a3f6e57208874274a435d336b23223dce615534c..5eaa1a37d8c4efdfc678d90e4bda06230cc4b093 100644
--- a/test/mjsunit/harmony/symbols.js
+++ b/test/mjsunit/harmony/symbols.js
@@ -82,6 +82,23 @@ function TestPrototype() {
TestPrototype()
+function TestConstructor() {
+ assertFalse(Object === Symbol.prototype.constructor)
+ assertFalse(Symbol === Object.prototype.constructor)
+ assertSame(Symbol, Symbol.prototype.constructor)
+ assertSame(Symbol, Symbol().__proto__.constructor)
+ assertSame(Symbol, Symbol(Symbol()).__proto__.constructor)
+ assertSame(Symbol, (new Symbol).__proto__.constructor)
+ assertSame(Symbol, (new Symbol()).__proto__.constructor)
+ assertSame(Symbol, (new Symbol(Symbol())).__proto__.constructor)
+ assertSame(Symbol, Object(Symbol()).__proto__.constructor)
+ for (var i in symbols) {
+ assertSame(Symbol, symbols[i].__proto__.constructor)
+ }
+}
+TestConstructor()
+
+
function TestName() {
for (var i in symbols) {
var name = symbols[i].name
« no previous file with comments | « src/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698