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

Unified Diff: test/cctest/test-api.cc

Issue 2071343002: Fix Object.prototype.toString() when @@toStringTag is not a string. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test for global object Created 4 years, 6 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/objects.cc ('k') | test/mjsunit/es6/object-tostring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 5571e296924c10b6597f6a6b3d83f237f01517d9..f8f2c0f636203eb3982a0baf7534ab7e212996e6 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13351,7 +13351,7 @@ THREADED_TEST(ObjectProtoToString) {
value =
context->Global()->ObjectProtoToString(context.local()).ToLocalChecked();
CHECK(value->IsString() &&
- value->Equals(context.local(), v8_str("[object global]")).FromJust());
+ value->Equals(context.local(), v8_str("[object Object]")).FromJust());
// Check ordinary object
Local<Value> object =
@@ -13397,7 +13397,7 @@ TEST(ObjectProtoToStringES6) {
value =
context->Global()->ObjectProtoToString(context.local()).ToLocalChecked();
CHECK(value->IsString() &&
- value->Equals(context.local(), v8_str("[object global]")).FromJust());
+ value->Equals(context.local(), v8_str("[object Object]")).FromJust());
// Check ordinary object
Local<Value> object = CompileRun("new Object()");
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/es6/object-tostring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698