| 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..1c58b418ff3f0c7e5f1eb12efc0dbf1a85430499 100644
|
| --- a/test/unittests/api/remote-object-unittest.cc
|
| +++ b/test/unittests/api/remote-object-unittest.cc
|
| @@ -63,10 +63,35 @@ 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);
|
| +}
|
| +
|
| +TEST_F(RemoteObjectTest, TypeOfRemoteObject) {
|
| + Local<FunctionTemplate> constructor_template =
|
| + FunctionTemplate::New(isolate(), Constructor);
|
| + constructor_template->InstanceTemplate()->SetAccessCheckCallbackAndHandler(
|
| + AccessCheck, NamedPropertyHandlerConfiguration(NamedGetter),
|
| + IndexedPropertyHandlerConfiguration());
|
| +
|
| + Local<Object> remote_object =
|
| + constructor_template->NewRemoteInstance().ToLocalChecked();
|
| + String::Utf8Value result(remote_object->TypeOf(isolate()));
|
| + EXPECT_STREQ("object", *result);
|
| +}
|
| +
|
| } // namespace v8
|
|
|