Delete historical data usage from store when user clears data usage.
[chromium-blink-merge.git] / ppapi / tests / test_pdf.cc
blobea79ab773cc3ca826c52f2456b62c5c737386c84
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ppapi/tests/test_pdf.h"
7 #include "ppapi/c/private/ppb_pdf.h"
8 #include "ppapi/cpp/image_data.h"
9 #include "ppapi/cpp/point.h"
10 #include "ppapi/cpp/private/pdf.h"
11 #include "ppapi/cpp/var.h"
12 #include "ppapi/tests/testing_instance.h"
14 REGISTER_TEST_CASE(PDF);
16 TestPDF::TestPDF(TestingInstance* instance)
17 : TestCase(instance) {
20 void TestPDF::RunTests(const std::string& filter) {
21 RUN_TEST(GetV8ExternalSnapshotData, filter);
24 std::string TestPDF::TestGetV8ExternalSnapshotData() {
25 const char* natives_data;
26 const char* snapshot_data;
27 int natives_size;
28 int snapshot_size;
30 pp::PDF::GetV8ExternalSnapshotData(instance_, &natives_data, &natives_size,
31 &snapshot_data, &snapshot_size);
32 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
33 ASSERT_NE(natives_data, (char*) (NULL));
34 ASSERT_NE(natives_size, 0);
35 ASSERT_NE(snapshot_data, (char*) (NULL));
36 ASSERT_NE(snapshot_size, 0);
37 #else
38 ASSERT_EQ(natives_data, (char*) (NULL));
39 ASSERT_EQ(natives_size, 0);
40 ASSERT_EQ(snapshot_data, (char*) (NULL));
41 ASSERT_EQ(snapshot_size, 0);
42 #endif
43 PASS();