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 d03050ed675b365c7edea40ff4011a575619487d..64a0f7ae30fe5fbec4b7d1d0c57e48a40c94929d 100644 |
--- a/test/unittests/api/remote-object-unittest.cc |
+++ b/test/unittests/api/remote-object-unittest.cc |
@@ -27,6 +27,29 @@ void Constructor(const FunctionCallbackInfo<Value>& info) { |
} // namespace |
+TEST_F(RemoteObjectTest, CreationContextOfRemoteContext) { |
+ Local<ObjectTemplate> global_template = ObjectTemplate::New(isolate()); |
+ global_template->SetAccessCheckCallbackAndHandler( |
+ AccessCheck, NamedPropertyHandlerConfiguration(NamedGetter), |
+ IndexedPropertyHandlerConfiguration()); |
+ |
+ Local<Object> remote_context = |
+ Context::NewRemoteContext(isolate(), global_template).ToLocalChecked(); |
+ EXPECT_TRUE(remote_context->CreationContext().IsEmpty()); |
+} |
+ |
+TEST_F(RemoteObjectTest, CreationContextOfRemoteObject) { |
+ Local<FunctionTemplate> constructor_template = |
+ FunctionTemplate::New(isolate(), Constructor); |
+ constructor_template->InstanceTemplate()->SetAccessCheckCallbackAndHandler( |
+ AccessCheck, NamedPropertyHandlerConfiguration(NamedGetter), |
+ IndexedPropertyHandlerConfiguration()); |
+ |
+ Local<Object> remote_object = |
+ constructor_template->NewRemoteInstance().ToLocalChecked(); |
+ EXPECT_TRUE(remote_object->CreationContext().IsEmpty()); |
+} |
+ |
TEST_F(RemoteObjectTest, RemoteContextInstanceChecks) { |
Local<FunctionTemplate> parent_template = |
FunctionTemplate::New(isolate(), Constructor); |