| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 6bea3eaefee603ed7bc02a56be251082ba6ad27a..d06cd7e7c1f13aceabc30badd25be5844cf6a45f 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -24985,3 +24985,21 @@ TEST(MemoryPressure) {
|
| isolate->MemoryPressureNotification(v8::MemoryPressureLevel::kNone);
|
| CHECK(!CcTest::i_isolate()->heap()->ShouldOptimizeForMemoryUsage());
|
| }
|
| +
|
| +TEST(SetIntegrityLevel) {
|
| + LocalContext context;
|
| + v8::Isolate* isolate = CcTest::isolate();
|
| + v8::HandleScope scope(isolate);
|
| +
|
| + v8::Local<v8::Object> obj = v8::Object::New(isolate);
|
| + CHECK(context->Global()->Set(context.local(), v8_str("o"), obj).FromJust());
|
| +
|
| + v8::Local<v8::Value> is_frozen = CompileRun("Object.isFrozen(o)");
|
| + CHECK(!is_frozen->BooleanValue(context.local()).FromJust());
|
| +
|
| + CHECK(obj->SetIntegrityLevel(context.local(), v8::IntegrityLevel::kFrozen)
|
| + .FromJust());
|
| +
|
| + is_frozen = CompileRun("Object.isFrozen(o)");
|
| + CHECK(is_frozen->BooleanValue(context.local()).FromJust());
|
| +}
|
|
|