Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
embedder_test_main.cpp
Go to the documentation of this file.
1
// Copyright 2018 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
include
"build/build_config.h"
6
#
include
"core/fxcrt/fx_memory.h"
7
#
include
"testing/embedder_test_environment.h"
8
#
include
"testing/gmock/include/gmock/gmock.h"
9
#
include
"testing/gtest/include/gtest/gtest.h"
10
11
#
ifdef
PDF_ENABLE_V8
12
#
include
"testing/v8_test_environment.h"
13
#
endif
// PDF_ENABLE_V8
14
15
#
if
defined
(
PDF_USE_PARTITION_ALLOC
)
16
#
include
"testing/allocator_shim_config.h"
17
#
endif
18
19
// Can't use gtest-provided main since we need to create our own
20
// testing environment which needs the executable path in order to
21
// find the external V8 binary data files.
22
int
main
(
int
argc,
char
** argv) {
23
#
if
defined
(
PDF_USE_PARTITION_ALLOC
)
24
pdfium::ConfigurePartitionAllocShimPartitionForTest();
25
#
endif
26
27
FX_InitializeMemoryAllocators
(
)
;
28
29
#
ifdef
PDF_ENABLE_V8
30
// The env will be deleted by gtest.
31
AddGlobalTestEnvironment(
new
V8TestEnvironment(argv[0]));
32
#
endif
// PDF_ENABLE_V8
33
34
// The env will be deleted by gtest.
35
AddGlobalTestEnvironment(
new
EmbedderTestEnvironment
);
36
37
testing::InitGoogleTest(&argc, argv);
38
testing::InitGoogleMock(&argc, argv);
39
40
// Anything remaining in argc/argv is an embedder_tests flag.
41
EmbedderTestEnvironment
::
GetInstance
(
)
->
AddFlags
(
argc
,
argv
)
;
42
43
return
RUN_ALL_TESTS();
44
}
EmbedderTestEnvironment
Definition
embedder_test_environment.h:14
EmbedderTestEnvironment::AddFlags
void AddFlags(int argc, char **argv)
Definition
embedder_test_environment.cpp:67
EmbedderTestEnvironment::GetInstance
static EmbedderTestEnvironment * GetInstance()
Definition
embedder_test_environment.cpp:36
FX_InitializeMemoryAllocators
void FX_InitializeMemoryAllocators()
Definition
fx_memory_malloc.cpp:69
main
int main(int argc, char *argv[])
[ctor_close]
Definition
src_corelib_animation_qpropertyanimation.cpp:100
qtwebengine
src
3rdparty
chromium
third_party
pdfium
testing
embedder_test_main.cpp
Generated on
for Qt by
1.18.0