| OLD | NEW | 
|---|
| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 217   if (FPDF_HasXFAField(document_, &docType)) | 217   if (FPDF_HasXFAField(document_, &docType)) | 
| 218   { | 218   { | 
| 219     if (docType != DOCTYPE_PDF) | 219     if (docType != DOCTYPE_PDF) | 
| 220       (void) FPDF_LoadXFA(document_); | 220       (void) FPDF_LoadXFA(document_); | 
| 221   } | 221   } | 
| 222   (void) FPDF_GetDocPermissions(document_); | 222   (void) FPDF_GetDocPermissions(document_); | 
| 223   (void) FPDFAvail_IsFormAvail(avail_, &hints_); | 223   (void) FPDFAvail_IsFormAvail(avail_, &hints_); | 
| 224 | 224 | 
| 225   IPDF_JSPLATFORM* platform = static_cast<IPDF_JSPLATFORM*>(this); | 225   IPDF_JSPLATFORM* platform = static_cast<IPDF_JSPLATFORM*>(this); | 
| 226   memset(platform, 0, sizeof(IPDF_JSPLATFORM)); | 226   memset(platform, 0, sizeof(IPDF_JSPLATFORM)); | 
| 227   platform->version = 1; | 227   platform->version = 2; | 
| 228   platform->app_alert = AlertTrampoline; | 228   platform->app_alert = AlertTrampoline; | 
| 229 | 229 | 
| 230   FPDF_FORMFILLINFO* formfillinfo = static_cast<FPDF_FORMFILLINFO*>(this); | 230   FPDF_FORMFILLINFO* formfillinfo = static_cast<FPDF_FORMFILLINFO*>(this); | 
| 231   memset(formfillinfo, 0, sizeof(FPDF_FORMFILLINFO)); | 231   memset(formfillinfo, 0, sizeof(FPDF_FORMFILLINFO)); | 
| 232   formfillinfo->version = 1; | 232   formfillinfo->version = 1; | 
| 233   formfillinfo->FFI_SetTimer = SetTimerTrampoline; | 233   formfillinfo->FFI_SetTimer = SetTimerTrampoline; | 
| 234   formfillinfo->FFI_KillTimer = KillTimerTrampoline; | 234   formfillinfo->FFI_KillTimer = KillTimerTrampoline; | 
| 235   formfillinfo->m_pJsPlatform = platform; | 235   formfillinfo->m_pJsPlatform = platform; | 
| 236 | 236 | 
| 237   form_handle_ = FPDFDOC_InitFormFillEnvironment(document_, formfillinfo); | 237   form_handle_ = FPDFDOC_InitFormFillEnvironment(document_, formfillinfo); | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 317 } | 317 } | 
| 318 | 318 | 
| 319 // Can't use gtest-provided main since we need to stash the path to the | 319 // Can't use gtest-provided main since we need to stash the path to the | 
| 320 // executable in order to find the external V8 binary data files. | 320 // executable in order to find the external V8 binary data files. | 
| 321 int main(int argc, char** argv) { | 321 int main(int argc, char** argv) { | 
| 322   g_exe_path_ = argv[0]; | 322   g_exe_path_ = argv[0]; | 
| 323   testing::InitGoogleTest(&argc, argv); | 323   testing::InitGoogleTest(&argc, argv); | 
| 324   testing::InitGoogleMock(&argc, argv); | 324   testing::InitGoogleMock(&argc, argv); | 
| 325   return RUN_ALL_TESTS(); | 325   return RUN_ALL_TESTS(); | 
| 326 } | 326 } | 
| OLD | NEW | 
|---|