#include "include/v8-context.h"
#include "include/v8-function.h"
#include "include/v8-isolate.h"
#include "include/v8-local-handle.h"
#include "include/v8-primitive.h"
#include "include/v8-script.h"
#include "include/v8-template.h"
#include "src/debug/debug.h"
#include "test/unittests/test-utils.h"
#include "testing/gmock-support.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
IsInt32;
IsString;
int32_t g_cross_context_int = …;
bool g_expect_interceptor_call = …;
class AccessCheckTest : public TestWithIsolate { … };
namespace {
inline v8::Local<v8::String> v8_str(const char* x) { … }
inline v8::Local<v8::String> v8_str(v8::Isolate* isolate, const char* x) { … }
bool AccessCheck(Local<Context> accessing_context,
Local<Object> accessed_object, Local<Value> data) { … }
MaybeLocal<Value> CompileRun(Isolate* isolate, const char* source) { … }
}
TEST_F(AccessCheckTest, GetOwnPropertyDescriptor) { … }
class AccessRegressionTest : public AccessCheckTest { … };
TEST_F(AccessRegressionTest,
InstantiatedLazyAccessorPairsHaveCorrectNativeContext) { … }
TEST_F(AccessRegressionTest,
InstantiatedLazyAccessorPairsHaveCorrectNativeContextDebug) { … }
v8::Intercepted NamedGetter(Local<Name> property,
const PropertyCallbackInfo<Value>& info) { … }
v8::Intercepted NamedSetter(Local<Name> property, Local<Value> value,
const PropertyCallbackInfo<void>& info) { … }
v8::Intercepted NamedQuery(Local<Name> property,
const PropertyCallbackInfo<Integer>& info) { … }
v8::Intercepted NamedDeleter(Local<Name> property,
const PropertyCallbackInfo<Boolean>& info) { … }
void NamedEnumerator(const PropertyCallbackInfo<Array>& info) { … }
v8::Intercepted IndexedGetter(uint32_t index,
const PropertyCallbackInfo<Value>& info) { … }
v8::Intercepted IndexedSetter(uint32_t index, Local<Value> value,
const PropertyCallbackInfo<void>& info) { … }
v8::Intercepted IndexedQuery(uint32_t index,
const PropertyCallbackInfo<Integer>& info) { … }
v8::Intercepted IndexedDeleter(uint32_t index,
const PropertyCallbackInfo<Boolean>& info) { … }
void IndexedEnumerator(const PropertyCallbackInfo<Array>& info) { … }
v8::Intercepted MethodGetter(Local<Name> property,
const PropertyCallbackInfo<Value>& info) { … }
void MethodCallback(const FunctionCallbackInfo<Value>& info) { … }
v8::Intercepted NamedGetterThrowsException(
Local<Name> property, const PropertyCallbackInfo<Value>& info) { … }
v8::Intercepted NamedSetterThrowsException(
Local<Name> property, Local<Value> value,
const PropertyCallbackInfo<void>& info) { … }
v8::Intercepted IndexedGetterThrowsException(
uint32_t index, const PropertyCallbackInfo<Value>& info) { … }
v8::Intercepted IndexedSetterThrowsException(
uint32_t index, Local<Value> value,
const PropertyCallbackInfo<void>& info) { … }
void GetCrossContextInt(Local<Name> property,
const PropertyCallbackInfo<Value>& info) { … }
void SetCrossContextInt(Local<Name> property, Local<Value> value,
const PropertyCallbackInfo<void>& info) { … }
void Return42(Local<String> property, const PropertyCallbackInfo<Value>& info) { … }
void Ctor(const FunctionCallbackInfo<Value>& info) { … }
TEST_F(AccessCheckTest, AccessCheckWithInterceptor) { … }
TEST_F(AccessCheckTest, CallFunctionWithRemoteContextReceiver) { … }
TEST_F(AccessCheckTest, AccessCheckWithExceptionThrowingInterceptor) { … }
TEST_F(AccessCheckTest, NewRemoteContext) { … }
TEST_F(AccessCheckTest, NewRemoteInstance) { … }
}