Commit e0021151 authored by baixo's avatar baixo Committed by Commit bot

Because the test is sandboxed, it cannot call LoadV8Snapshot(). For the same...

Because the test is sandboxed, it cannot call LoadV8Snapshot(). For the same reason, LoadV8Snapshot() must have been called in PreInitializeSandbox(), so the asserts are still valid.

BUG=421063

Review URL: https://codereview.chromium.org/735283002

Cr-Commit-Position: refs/heads/master@{#305000}
parent b00bc9bb
......@@ -18,7 +18,6 @@
'<@(test_trusted_source_files)',
],
'dependencies': [
'../gin/gin.gyp:gin',
'ppapi.gyp:ppapi_cpp',
'ppapi_internal.gyp:ppapi_shared',
],
......
......@@ -7,7 +7,6 @@ include_rules = [
"-uncode",
"-testing",
"-ppapi",
"+gin",
"+ppapi/c",
"+ppapi/cpp",
"+ppapi/lib",
......
......@@ -11,10 +11,6 @@
#include "ppapi/cpp/var.h"
#include "ppapi/tests/testing_instance.h"
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
#include "gin/public/isolate_holder.h"
#endif
REGISTER_TEST_CASE(PDF);
TestPDF::TestPDF(TestingInstance* instance)
......@@ -55,18 +51,15 @@ std::string TestPDF::TestGetV8ExternalSnapshotData() {
const char* snapshot_data;
int natives_size;
int snapshot_size;
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
bool loaded_ok = gin::IsolateHolder::LoadV8Snapshot();
ASSERT_TRUE(loaded_ok);
pp::PDF::GetV8ExternalSnapshotData(instance_, &natives_data, &natives_size,
&snapshot_data, &snapshot_size);
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
ASSERT_NE(natives_data, (char*) (NULL));
ASSERT_NE(natives_size, 0);
ASSERT_NE(snapshot_data, (char*) (NULL));
ASSERT_NE(snapshot_size, 0);
#else
pp::PDF::GetV8ExternalSnapshotData(instance_, &natives_data, &natives_size,
&snapshot_data, &snapshot_size);
ASSERT_EQ(natives_data, (char*) (NULL));
ASSERT_EQ(natives_size, 0);
ASSERT_EQ(snapshot_data, (char*) (NULL));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment