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> |
11 | 11 |
12 #include <list> | 12 #include <list> |
13 #include <string> | 13 #include <string> |
14 #include <utility> | 14 #include <utility> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "../fpdfsdk/include/fpdftext.h" | 17 #include "../fpdfsdk/include/fpdftext.h" |
18 #include "../fpdfsdk/include/fpdfview.h" | 18 #include "../fpdfsdk/include/fpdfview.h" |
19 #include "../core/include/fxcrt/fx_system.h" | 19 #include "../core/include/fxcrt/fx_system.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "v8/include/v8.h" | 21 #include "v8/include/v8.h" |
21 | 22 |
22 #ifdef _WIN32 | 23 #ifdef _WIN32 |
23 #define snprintf _snprintf | 24 #define snprintf _snprintf |
24 #define PATH_SEPARATOR '\\' | 25 #define PATH_SEPARATOR '\\' |
25 #else | 26 #else |
26 #define PATH_SEPARATOR '/' | 27 #define PATH_SEPARATOR '/' |
27 #endif | 28 #endif |
28 | 29 |
29 namespace { | 30 namespace { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 int icon) { | 337 int icon) { |
337 EmbedderTest* test = static_cast<EmbedderTest*>(platform); | 338 EmbedderTest* test = static_cast<EmbedderTest*>(platform); |
338 return test->delegate_->Alert(message, title, type, icon); | 339 return test->delegate_->Alert(message, title, type, icon); |
339 } | 340 } |
340 | 341 |
341 // Can't use gtest-provided main since we need to stash the path to the | 342 // Can't use gtest-provided main since we need to stash the path to the |
342 // executable in order to find the external V8 binary data files. | 343 // executable in order to find the external V8 binary data files. |
343 int main(int argc, char** argv) { | 344 int main(int argc, char** argv) { |
344 g_exe_path_ = argv[0]; | 345 g_exe_path_ = argv[0]; |
345 testing::InitGoogleTest(&argc, argv); | 346 testing::InitGoogleTest(&argc, argv); |
| 347 testing::InitGoogleMock(&argc, argv); |
346 return RUN_ALL_TESTS(); | 348 return RUN_ALL_TESTS(); |
347 } | 349 } |
OLD | NEW |