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

Side by Side Diff: testing/test_support.h

Issue 1413593003: Merge to XFA: Consolidate test support code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove stray merges. Created 5 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2015 PDFium 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.
4
5 #ifndef TESTING_EMBEDDER_TEST_SUPPORT_H_
6 #define TESTING_EMBEDDER_TEST_SUPPORT_H_
7
8 #include <stdlib.h>
9 #include <string>
10
11 #ifdef PDF_ENABLE_V8
12 #include "v8/include/libplatform/libplatform.h"
13 #include "v8/include/v8.h"
14 #endif
15
16 // Reads the entire contents of a file into a newly malloc'd buffer.
17 char* GetFileContents(const char* filename, size_t* retlen);
18
19 #ifdef PDF_ENABLE_V8
20 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
21 bool InitializeV8ForPDFium(const std::string& exe_path,
22 const std::string& bin_dir,
23 v8::StartupData* natives_blob,
24 v8::StartupData* snapshot_blob,
25 v8::Platform** platform);
26 #else // V8_USE_EXTERNAL_STARTUP_DATA
27 bool InitializeV8ForPDFium(v8::Platform** platform);
28 #endif // V8_USE_EXTERNAL_STARTUP_DATA
29 #endif // PDF_ENABLE_V8
30
31 class TestLoader {
32 public:
33 TestLoader(const char* pBuf, size_t len);
34 static int GetBlock(void* param,
35 unsigned long pos,
36 unsigned char* pBuf,
37 unsigned long size);
38
39 private:
40 const char* const m_pBuf;
41 const size_t m_Len;
42 };
43
44 #endif // TESTING_EMBEDDER_TEST_SUPPORT_H_
OLDNEW
« samples/BUILD.gn ('K') | « testing/embedder_test.cpp ('k') | testing/test_support.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698