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

Unified Diff: test/unittests/api/remote-object-unittest.cc

Issue 2715593002: Don't mark remote contexts as callable. (Closed)
Patch Set: hmm Created 3 years, 10 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
« src/bootstrapper.cc ('K') | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/api/remote-object-unittest.cc
diff --git a/test/unittests/api/remote-object-unittest.cc b/test/unittests/api/remote-object-unittest.cc
index a5b05b6aa91a4780987f51f5408166aa556356ea..4bd6f7d0e5232ffe79cd63b15d1010a53ea82327 100644
--- a/test/unittests/api/remote-object-unittest.cc
+++ b/test/unittests/api/remote-object-unittest.cc
@@ -63,10 +63,21 @@ TEST_F(RemoteObjectTest, RemoteContextInstanceChecks) {
Local<Object> remote_context =
Context::NewRemoteContext(isolate(),
- constructor_template->InstanceTemplate())
+ constructor_template->InstanceTemplate())
.ToLocalChecked();
EXPECT_TRUE(parent_template->HasInstance(remote_context));
EXPECT_TRUE(constructor_template->HasInstance(remote_context));
}
+TEST_F(RemoteObjectTest, TypeOfRemoteContext) {
+ Local<ObjectTemplate> global_template = ObjectTemplate::New(isolate());
+ global_template->SetAccessCheckCallbackAndHandler(
+ AccessCheck, NamedPropertyHandlerConfiguration(NamedGetter),
+ IndexedPropertyHandlerConfiguration());
+ Local<Object> remote_context =
+ Context::NewRemoteContext(isolate(), global_template).ToLocalChecked();
+ String::Utf8Value result(remote_context->TypeOf(isolate()));
+ EXPECT_STREQ("object", *result);
+}
+
} // namespace v8
« src/bootstrapper.cc ('K') | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698