OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/test/base/chrome_test_launcher.h" | 5 #include "chrome/test/base/chrome_test_launcher.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/leak_annotations.h" | 8 #include "base/debug/leak_annotations.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 #endif | 115 #endif |
116 | 116 |
117 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) | 117 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) |
118 // We leak this pointer intentionally. The crash client needs to outlive | 118 // We leak this pointer intentionally. The crash client needs to outlive |
119 // all other code. | 119 // all other code. |
120 ChromeCrashReporterClient* crash_client = new ChromeCrashReporterClient(); | 120 ChromeCrashReporterClient* crash_client = new ChromeCrashReporterClient(); |
121 ANNOTATE_LEAKING_OBJECT_PTR(crash_client); | 121 ANNOTATE_LEAKING_OBJECT_PTR(crash_client); |
122 crash_reporter::SetCrashReporterClient(crash_client); | 122 crash_reporter::SetCrashReporterClient(crash_client); |
123 #endif | 123 #endif |
124 | 124 |
125 #if defined(OS_WIN) | |
126 base::CommandLine::Init(0, nullptr); | |
127 std::string process_type = | |
128 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | |
129 switches::kProcessType); | |
130 crash_reporter::InitializeCrashpad(process_type.empty(), process_type); | |
131 #endif | |
132 | |
133 ChromeTestLauncherDelegate launcher_delegate(runner); | 125 ChromeTestLauncherDelegate launcher_delegate(runner); |
134 return content::LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 126 return content::LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
135 } | 127 } |
OLD | NEW |