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

Unified Diff: test/mjsunit/es6/array-tostring.js

Issue 895633004: Update harmony Object.prototype.toString to 2/2/2015 spec (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/es6/array-tostring.js
diff --git a/test/mjsunit/es6/array-tostring.js b/test/mjsunit/es6/array-tostring.js
index 625011f4387cc79b7ffd6df6eef8a44a3a269cd0..8a9198ca16353905704876c2ff1442ceb2b9dc22 100644
--- a/test/mjsunit/es6/array-tostring.js
+++ b/test/mjsunit/es6/array-tostring.js
@@ -33,7 +33,7 @@ function testToStringTag(className) {
// Using builtin toStringTags
var obj = {};
obj[Symbol.toStringTag] = className;
- assertEquals("[object ~" + className + "]",
+ assertEquals("[object " + className + "]",
Array.prototype.toString.call(obj));
// Getter throws
@@ -50,7 +50,7 @@ function testToStringTag(className) {
Object.defineProperty(obj, Symbol.toStringTag, {
get: function() { return className; }
});
- assertEquals("[object ~" + className + "]",
+ assertEquals("[object " + className + "]",
Array.prototype.toString.call(obj));
// Custom, non-builtin toStringTags
@@ -100,14 +100,14 @@ function testToStringTag(className) {
function testToStringTagNonString(value) {
var obj = {};
obj[Symbol.toStringTag] = value;
- assertEquals("[object ???]", Array.prototype.toString.call(obj));
+ assertEquals("[object Object]", Array.prototype.toString.call(obj));
// With getter
obj = {};
Object.defineProperty(obj, Symbol.toStringTag, {
get: function() { return value; }
});
- assertEquals("[object ???]", Array.prototype.toString.call(obj));
+ assertEquals("[object Object]", Array.prototype.toString.call(obj));
}
@@ -138,7 +138,7 @@ testArrayToStringPropertyDesc();
function testArrayToStringOwnNonStringValue() {
var obj = Object.defineProperty({}, Symbol.toStringTag, { value: 1 });
- assertEquals("[object ???]", ([]).toString.call(obj));
+ assertEquals("[object Object]", ([]).toString.call(obj));
}
testArrayToStringOwnNonStringValue();

Powered by Google App Engine
This is Rietveld 408576698