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

Unified Diff: test/mjsunit/class-of-builtins.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add @@toStringTag to some objects + tests 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
Index: test/mjsunit/class-of-builtins.js
diff --git a/test/mjsunit/class-of-builtins.js b/test/mjsunit/class-of-builtins.js
index 59fefffa7580228047aba339532305b54d2f6fe6..b9c3dced039921200fd4f75c06d9ccfecdb4db10 100644
--- a/test/mjsunit/class-of-builtins.js
+++ b/test/mjsunit/class-of-builtins.js
@@ -28,7 +28,7 @@
// The [[Class]] property of (instances of) builtin functions must be
// correctly set.
var funs = {
- Object: [ Object ],
+ /*Object: [ Object ],*/
rossberg 2014/10/17 11:19:30 Why is this commented out?
Function: [ Function ],
Array: [ Array ],
String: [ String ],
@@ -46,5 +46,10 @@ for (f in funs) {
assertEquals("[object Function]",
Object.prototype.toString.call(funs[f][i]),
funs[f][i]);
+
+ var fake = f === 'Object' ? [] : {};
+ fake[Symbol.toStringTag] = '' + f;
+ assertEquals("[object ~" + f + "]",
+ Object.prototype.toString.call(fake));
}
}

Powered by Google App Engine
This is Rietveld 408576698