blob: 14042b0d20e62ee276ba6c6557e86337af3e171a [file] [log] [blame]
[email protected]7dd06a02010-12-09 02:56:241// Copyright (c) 2010 The Chromium 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.
[email protected]f7817822009-09-24 05:11:584
5#include <atlbase.h>
6#include <atlcom.h>
7#include "base/at_exit.h"
8#include "base/command_line.h"
[email protected]2e1101f2011-06-27 17:08:249#include "base/process.h"
10#include "chrome_frame/crash_server_init.h"
11#include "chrome_frame/test/chrome_frame_test_utils.h"
[email protected]f7817822009-09-24 05:11:5812#include "gtest/gtest.h"
13
14class ObligatoryModule: public CAtlExeModuleT<ObligatoryModule> {
15};
16
17ObligatoryModule g_obligatory_atl_module;
18
[email protected]7dd06a02010-12-09 02:56:2419static base::AtExitManager* g_at_exit_manager = NULL;
20
21void DeleteAllSingletons() {
22 if (g_at_exit_manager) {
23 g_at_exit_manager->ProcessCallbacksNow();
24 }
25}
26
[email protected]f7817822009-09-24 05:11:5827int main(int argc, char** argv) {
28 testing::InitGoogleTest(&argc, argv);
29
30 base::AtExitManager at_exit_manager;
[email protected]7dd06a02010-12-09 02:56:2431 g_at_exit_manager = &at_exit_manager;
[email protected]2e1101f2011-06-27 17:08:2432
33 base::ProcessHandle crash_service = chrome_frame_test::StartCrashService();
34
35 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad(
36 InitializeCrashReporting(HEADLESS));
37
[email protected]f7817822009-09-24 05:11:5838 CommandLine::Init(argc, argv);
39
40 RUN_ALL_TESTS();
[email protected]7dd06a02010-12-09 02:56:2441
42 g_at_exit_manager = NULL;
[email protected]2e1101f2011-06-27 17:08:2443
44 if (crash_service)
45 base::KillProcess(crash_service, 0, false);
[email protected]f7817822009-09-24 05:11:5846}