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 dc45d086ab86989221fff922e2f9885749387f78..7cc1f9be9b0685cc168cdf8cd2ddd8745953912b 100644 |
--- a/test/unittests/api/remote-object-unittest.cc |
+++ b/test/unittests/api/remote-object-unittest.cc |
@@ -59,4 +59,18 @@ TEST_F(RemoteObjectTest, CreationContextOfRemoteObject) { |
EXPECT_TRUE(remote_object->CreationContext().IsEmpty()); |
} |
+TEST_F(RemoteObjectTest, RemoteContextHasInstance) { |
+ v8::Local<v8::FunctionTemplate> constructor_template = |
+ v8::FunctionTemplate::New(isolate(), Constructor); |
+ constructor_template->InstanceTemplate()->SetAccessCheckCallbackAndHandler( |
+ AccessCheck, v8::NamedPropertyHandlerConfiguration(NamedGetter), |
+ v8::IndexedPropertyHandlerConfiguration()); |
+ |
+ v8::Local<v8::Object> remote_context = |
+ v8::Context::NewRemoteContext(isolate(), |
+ constructor_template->InstanceTemplate()) |
+ .ToLocalChecked(); |
+ EXPECT_TRUE(constructor_template->HasInstance(remote_context)); |
+} |
+ |
} // namespace v8 |