Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: chrome_frame/chrome_frame_unittest_main.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/chrome_frame_reporting.cc ('k') | chrome_frame/chrome_frame_version.rc.version » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include <atlbase.h>
6 #include <atlcom.h>
7
8 #include "base/at_exit.h"
9 #include "base/command_line.h"
10 #include "base/process/kill.h"
11 #include "base/process/process.h"
12 #include "base/test/launcher/unit_test_launcher.h"
13 #include "base/test/test_suite.h"
14 #include "chrome_frame/crash_server_init.h"
15 #include "chrome_frame/test/chrome_frame_test_utils.h"
16 #include "gtest/gtest.h"
17
18 class ObligatoryModule: public CAtlExeModuleT<ObligatoryModule> {
19 };
20
21 ObligatoryModule g_obligatory_atl_module;
22
23 static base::AtExitManager* g_at_exit_manager = NULL;
24
25 void DeleteAllSingletons() {
26 if (g_at_exit_manager) {
27 g_at_exit_manager->ProcessCallbacksNow();
28 }
29 }
30
31 namespace {
32
33 class NoAtExitBaseTestSuite : public base::TestSuite {
34 public:
35 NoAtExitBaseTestSuite(int argc, char** argv)
36 : base::TestSuite(argc, argv, false) {
37 }
38 };
39
40 int RunTests(int argc, char** argv) {
41 base::AtExitManager at_exit_manager;
42 g_at_exit_manager = &at_exit_manager;
43 NoAtExitBaseTestSuite test_suite(argc, argv);
44 int exit_code = test_suite.Run();
45 g_at_exit_manager = NULL;
46 return exit_code;
47 }
48
49 } // namespace
50
51 int main(int argc, char** argv) {
52 base::ProcessHandle crash_service = chrome_frame_test::StartCrashService();
53
54 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad(
55 InitializeCrashReporting(HEADLESS));
56
57 int exit_code = base::LaunchUnitTests(argc,
58 argv,
59 base::Bind(&RunTests, argc, argv));
60
61 if (crash_service)
62 base::KillProcess(crash_service, 0, false);
63
64 return exit_code;
65 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_reporting.cc ('k') | chrome_frame/chrome_frame_version.rc.version » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698