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 |