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

Side by Side Diff: testing/embedder_test.h

Issue 851283006: Fix build of pdfium_embeddertest under V8_USE_EXTERNAL_STARTUP_DATA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: One less ifdef 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 | « pdfium.gyp ('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"
(...skipping 15 matching lines...) Expand all
26 loader_(nullptr), 26 loader_(nullptr),
27 file_length_(0), 27 file_length_(0),
28 file_contents_(nullptr) { 28 file_contents_(nullptr) {
29 memset(&hints_, 0, sizeof(hints_)); 29 memset(&hints_, 0, sizeof(hints_));
30 memset(&file_access_, 0, sizeof(file_access_)); 30 memset(&file_access_, 0, sizeof(file_access_));
31 memset(&file_avail_, 0, sizeof(file_avail_)); 31 memset(&file_avail_, 0, sizeof(file_avail_));
32 } 32 }
33 33
34 virtual ~EmbedderTest() { } 34 virtual ~EmbedderTest() { }
35 35
36 static void SetExePath(const char* exe_path);
37
36 void SetUp() override; 38 void SetUp() override;
37 void TearDown() override; 39 void TearDown() override;
38 40
39 FPDF_DOCUMENT document() { return document_; } 41 FPDF_DOCUMENT document() { return document_; }
40 42
41 // Open the document specified by |filename|, or return false on failure. 43 // Open the document specified by |filename|, or return false on failure.
42 virtual bool OpenDocument(const std::string& filename); 44 virtual bool OpenDocument(const std::string& filename);
43 45
44 // Create and return a handle to the form fill module for use with the 46 // Create and return a handle to the form fill module for use with the
45 // FORM_ family of functions from fpdfformfill.h, or return NULL on failure. 47 // FORM_ family of functions from fpdfformfill.h, or return NULL on failure.
(...skipping 13 matching lines...) Expand all
59 virtual FPDF_PAGE LoadPage(int page_number, FPDF_FORMHANDLE form); 61 virtual FPDF_PAGE LoadPage(int page_number, FPDF_FORMHANDLE form);
60 62
61 // Convert a loaded page into a bitmap. 63 // Convert a loaded page into a bitmap.
62 virtual FPDF_BITMAP RenderPage(FPDF_PAGE page, FPDF_FORMHANDLE form); 64 virtual FPDF_BITMAP RenderPage(FPDF_PAGE page, FPDF_FORMHANDLE form);
63 65
64 // Relese the resources obtained from LoadPage(). Further use of |page| 66 // Relese the resources obtained from LoadPage(). Further use of |page|
65 // is prohibited after this call is made. 67 // is prohibited after this call is made.
66 virtual void UnloadPage(FPDF_PAGE page, FPDF_FORMHANDLE form); 68 virtual void UnloadPage(FPDF_PAGE page, FPDF_FORMHANDLE form);
67 69
68 private: 70 private:
71 static const char* g_exe_path_;
Lei Zhang 2015/01/23 01:10:11 Just put this in embedder_test.cpp in an anonymous
72
69 FPDF_DOCUMENT document_; 73 FPDF_DOCUMENT document_;
70 FPDF_AVAIL avail_; 74 FPDF_AVAIL avail_;
71 FX_DOWNLOADHINTS hints_; 75 FX_DOWNLOADHINTS hints_;
72 FPDF_FILEACCESS file_access_; 76 FPDF_FILEACCESS file_access_;
73 FX_FILEAVAIL file_avail_; 77 FX_FILEAVAIL file_avail_;
74 v8::StartupData natives_; 78 v8::StartupData natives_;
75 v8::StartupData snapshot_; 79 v8::StartupData snapshot_;
76 TestLoader* loader_; 80 TestLoader* loader_;
77 size_t file_length_; 81 size_t file_length_;
78 char* file_contents_; 82 char* file_contents_;
79 }; 83 };
80 84
81 #endif // TESTING_EMBEDDER_TEST_H_ 85 #endif // TESTING_EMBEDDER_TEST_H_
82 86
OLDNEW
« no previous file with comments | « pdfium.gyp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698