Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: testing/embedder_test.h

Issue 857483005: Follow-on to pdfium_embeddertests. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix copyright. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « testing/basic_embeddertest.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 PDFium Authors. All rights reserved. 1 // Copyright (c) 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TESTING_EMBEDDER_TEST_H_ 5 #ifndef TESTING_EMBEDDER_TEST_H_
6 #define TESTING_EMBEDDER_TEST_H_ 6 #define TESTING_EMBEDDER_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "../core/include/fxcrt/fx_system.h" 10 #include "../core/include/fxcrt/fx_system.h"
11 #include "../fpdfsdk/include/fpdf_dataavail.h" 11 #include "../fpdfsdk/include/fpdf_dataavail.h"
12 #include "../fpdfsdk/include/fpdfformfill.h" 12 #include "../fpdfsdk/include/fpdfformfill.h"
13 #include "../fpdfsdk/include/fpdfview.h" 13 #include "../fpdfsdk/include/fpdfview.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "v8/include/v8.h" 15 #include "v8/include/v8.h"
16 16
17 class TestLoader;
18
17 // This class is used to load a PDF document, and then run programatic 19 // This class is used to load a PDF document, and then run programatic
18 // API tests against it. 20 // API tests against it.
19 class EmbedderTest : public ::testing::Test { 21 class EmbedderTest : public ::testing::Test {
20 public: 22 public:
21 EmbedderTest() : 23 EmbedderTest() :
22 document_(nullptr), 24 document_(nullptr),
23 avail_(nullptr), 25 avail_(nullptr),
26 loader_(nullptr),
24 file_length_(0), 27 file_length_(0),
25 file_contents_(nullptr) { 28 file_contents_(nullptr) {
26 memset(&hints_, 0, sizeof(hints_)); 29 memset(&hints_, 0, sizeof(hints_));
27 memset(&file_access_, 0, sizeof(file_access_)); 30 memset(&file_access_, 0, sizeof(file_access_));
28 memset(&file_avail_, 0, sizeof(file_avail_)); 31 memset(&file_avail_, 0, sizeof(file_avail_));
29 } 32 }
30 33
31 virtual ~EmbedderTest() { } 34 virtual ~EmbedderTest() { }
32 35
33 void SetUp() override; 36 void SetUp() override;
(...skipping 29 matching lines...) Expand all
63 virtual void UnloadPage(FPDF_PAGE page, FPDF_FORMHANDLE form); 66 virtual void UnloadPage(FPDF_PAGE page, FPDF_FORMHANDLE form);
64 67
65 private: 68 private:
66 FPDF_DOCUMENT document_; 69 FPDF_DOCUMENT document_;
67 FPDF_AVAIL avail_; 70 FPDF_AVAIL avail_;
68 FX_DOWNLOADHINTS hints_; 71 FX_DOWNLOADHINTS hints_;
69 FPDF_FILEACCESS file_access_; 72 FPDF_FILEACCESS file_access_;
70 FX_FILEAVAIL file_avail_; 73 FX_FILEAVAIL file_avail_;
71 v8::StartupData natives_; 74 v8::StartupData natives_;
72 v8::StartupData snapshot_; 75 v8::StartupData snapshot_;
76 TestLoader* loader_;
73 size_t file_length_; 77 size_t file_length_;
74 char* file_contents_; 78 char* file_contents_;
75 }; 79 };
76 80
77 #endif // TESTING_EMBEDDER_TEST_H_ 81 #endif // TESTING_EMBEDDER_TEST_H_
78 82
OLDNEW
« no previous file with comments | « testing/basic_embeddertest.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698