1 // 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.
7 #include "base/at_exit.h"
8 #include "base/command_line.h"
9 #include "base/process.h"
10 #include "chrome_frame/crash_server_init.h"
11 #include "chrome_frame/test/chrome_frame_test_utils.h"
12 #include "gtest/gtest.h"
14 class ObligatoryModule
: public CAtlExeModuleT
<ObligatoryModule
> {
17 ObligatoryModule g_obligatory_atl_module
;
19 static base::AtExitManager
* g_at_exit_manager
= NULL
;
21 void DeleteAllSingletons() {
22 if (g_at_exit_manager
) {
23 g_at_exit_manager
->ProcessCallbacksNow();
27 int main(int argc
, char** argv
) {
28 testing::InitGoogleTest(&argc
, argv
);
30 base::AtExitManager at_exit_manager
;
31 g_at_exit_manager
= &at_exit_manager
;
33 base::ProcessHandle crash_service
= chrome_frame_test::StartCrashService();
35 google_breakpad::scoped_ptr
<google_breakpad::ExceptionHandler
> breakpad(
36 InitializeCrashReporting(HEADLESS
));
38 CommandLine::Init(argc
, argv
);
42 g_at_exit_manager
= NULL
;
45 base::KillProcess(crash_service
, 0, false);