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

Side by Side Diff: testing/embedder_test.cpp

Issue 1130843003: Make (and verify) public/ files compile under C. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Blank line. Created 5 years, 7 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 | « samples/pdfium_test.cc ('k') | no next file » | 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 #include "embedder_test.h" 5 #include "embedder_test.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 int Get_Block(void* param, unsigned long pos, unsigned char* pBuf, 161 int Get_Block(void* param, unsigned long pos, unsigned char* pBuf,
162 unsigned long size) { 162 unsigned long size) {
163 TestLoader* pLoader = (TestLoader*) param; 163 TestLoader* pLoader = (TestLoader*) param;
164 if (pos + size < pos || pos + size > pLoader->m_Len) return 0; 164 if (pos + size < pos || pos + size > pLoader->m_Len) return 0;
165 memcpy(pBuf, pLoader->m_pBuf + pos, size); 165 memcpy(pBuf, pLoader->m_pBuf + pos, size);
166 return 1; 166 return 1;
167 } 167 }
168 168
169 bool Is_Data_Avail(FX_FILEAVAIL* pThis, size_t offset, size_t size) { 169 FPDF_BOOL Is_Data_Avail(FX_FILEAVAIL* pThis, size_t offset, size_t size) {
170 return true; 170 return true;
171 } 171 }
172 172
173 void Add_Segment(FX_DOWNLOADHINTS* pThis, size_t offset, size_t size) { 173 void Add_Segment(FX_DOWNLOADHINTS* pThis, size_t offset, size_t size) {
174 } 174 }
175 175
176 EmbedderTest::EmbedderTest() : 176 EmbedderTest::EmbedderTest() :
177 document_(nullptr), 177 document_(nullptr),
178 form_handle_(nullptr), 178 form_handle_(nullptr),
179 avail_(nullptr), 179 avail_(nullptr),
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 // Can't use gtest-provided main since we need to stash the path to the 339 // Can't use gtest-provided main since we need to stash the path to the
340 // executable in order to find the external V8 binary data files. 340 // executable in order to find the external V8 binary data files.
341 int main(int argc, char** argv) { 341 int main(int argc, char** argv) {
342 g_exe_path_ = argv[0]; 342 g_exe_path_ = argv[0];
343 testing::InitGoogleTest(&argc, argv); 343 testing::InitGoogleTest(&argc, argv);
344 testing::InitGoogleMock(&argc, argv); 344 testing::InitGoogleMock(&argc, argv);
345 return RUN_ALL_TESTS(); 345 return RUN_ALL_TESTS();
346 } 346 }
OLDNEW
« no previous file with comments | « samples/pdfium_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698