| OLD | NEW | 
|---|
| 1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 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_TEST_SUPPORT_H_ | 5 #ifndef TESTING_TEST_SUPPORT_H_ | 
| 6 #define TESTING_TEST_SUPPORT_H_ | 6 #define TESTING_TEST_SUPPORT_H_ | 
| 7 | 7 | 
| 8 #include <stdlib.h> | 8 #include <stdlib.h> | 
| 9 #include <memory> | 9 #include <memory> | 
| 10 #include <string> | 10 #include <string> | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 76     const std::wstring& wstr); | 76     const std::wstring& wstr); | 
| 77 | 77 | 
| 78 #ifdef PDF_ENABLE_V8 | 78 #ifdef PDF_ENABLE_V8 | 
| 79 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 79 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 
| 80 bool InitializeV8ForPDFium(const std::string& exe_path, | 80 bool InitializeV8ForPDFium(const std::string& exe_path, | 
| 81                            const std::string& bin_dir, | 81                            const std::string& bin_dir, | 
| 82                            v8::StartupData* natives_blob, | 82                            v8::StartupData* natives_blob, | 
| 83                            v8::StartupData* snapshot_blob, | 83                            v8::StartupData* snapshot_blob, | 
| 84                            v8::Platform** platform); | 84                            v8::Platform** platform); | 
| 85 #else   // V8_USE_EXTERNAL_STARTUP_DATA | 85 #else   // V8_USE_EXTERNAL_STARTUP_DATA | 
| 86 bool InitializeV8ForPDFium(v8::Platform** platform); | 86 bool InitializeV8ForPDFium(const std::string& exe_path, | 
|  | 87                            v8::Platform** platform); | 
| 87 #endif  // V8_USE_EXTERNAL_STARTUP_DATA | 88 #endif  // V8_USE_EXTERNAL_STARTUP_DATA | 
| 88 #endif  // PDF_ENABLE_V8 | 89 #endif  // PDF_ENABLE_V8 | 
| 89 | 90 | 
| 90 class TestLoader { | 91 class TestLoader { | 
| 91  public: | 92  public: | 
| 92   TestLoader(const char* pBuf, size_t len); | 93   TestLoader(const char* pBuf, size_t len); | 
| 93   static int GetBlock(void* param, | 94   static int GetBlock(void* param, | 
| 94                       unsigned long pos, | 95                       unsigned long pos, | 
| 95                       unsigned char* pBuf, | 96                       unsigned char* pBuf, | 
| 96                       unsigned long size); | 97                       unsigned long size); | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 109 | 110 | 
| 110  private: | 111  private: | 
| 111   static int WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, | 112   static int WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, | 
| 112                                 const void* data, | 113                                 const void* data, | 
| 113                                 unsigned long size); | 114                                 unsigned long size); | 
| 114 | 115 | 
| 115   std::string m_String; | 116   std::string m_String; | 
| 116 }; | 117 }; | 
| 117 | 118 | 
| 118 #endif  // TESTING_TEST_SUPPORT_H_ | 119 #endif  // TESTING_TEST_SUPPORT_H_ | 
| OLD | NEW | 
|---|