blob: d4318d1bd580de53a3d59da9089adf3838acd917 [file] [log] [blame]
Dan Sinclair5553d8b2018-01-03 09:44:28 -05001// Copyright 2018 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
Dan Sinclair5553d8b2018-01-03 09:44:28 -05005#include "core/fxcrt/fx_memory.h"
Tom Sepezaf33f512020-06-12 01:00:10 +00006#include "testing/embedder_test.h"
Dan Sinclair5553d8b2018-01-03 09:44:28 -05007#include "testing/gmock/include/gmock/gmock.h"
8#include "testing/gtest/include/gtest/gtest.h"
Dan Sinclair5553d8b2018-01-03 09:44:28 -05009
Tom Sepezaf33f512020-06-12 01:00:10 +000010// Can't use gtest-provided main since we need to create our own
11// testing environment which needs the executable path in order to
12// find the external V8 binary data files.
Dan Sinclair5553d8b2018-01-03 09:44:28 -050013int main(int argc, char** argv) {
Dan Sinclair5553d8b2018-01-03 09:44:28 -050014 FXMEM_InitializePartitionAlloc();
15
Dan Sinclair5553d8b2018-01-03 09:44:28 -050016 // The env will be deleted by gtest.
Tom Sepezaf33f512020-06-12 01:00:10 +000017 AddGlobalTestEnvironment(new EmbedderTestEnvironment(argv[0]));
Dan Sinclair5553d8b2018-01-03 09:44:28 -050018
19 testing::InitGoogleTest(&argc, argv);
20 testing::InitGoogleMock(&argc, argv);
21
Tom Sepezaf33f512020-06-12 01:00:10 +000022 return RUN_ALL_TESTS();
Dan Sinclair5553d8b2018-01-03 09:44:28 -050023}