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

Side by Side Diff: chrome/test/base/mash_browser_tests_main.cc

Issue 2643853005: chromeos: Initial support for crash reporting for chrome --mash (Closed)
Patch Set: deps Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const base::CommandLine& command_line = 145 const base::CommandLine& command_line =
146 *base::CommandLine::ForCurrentProcess(); 146 *base::CommandLine::ForCurrentProcess();
147 if (!command_line.HasSwitch("run-in-mash")) 147 if (!command_line.HasSwitch("run-in-mash"))
148 return false; 148 return false;
149 149
150 if (command_line.HasSwitch(MojoTestConnector::kMashApp)) { 150 if (command_line.HasSwitch(MojoTestConnector::kMashApp)) {
151 #if defined(OS_LINUX) 151 #if defined(OS_LINUX)
152 base::AtExitManager exit_manager; 152 base::AtExitManager exit_manager;
153 #endif 153 #endif
154 base::i18n::InitializeICU(); 154 base::i18n::InitializeICU();
155
156 #if !defined(OFFICIAL_BUILD)
157 base::debug::EnableInProcessStackDumping();
158 #endif
159
155 service_manager::RunStandaloneService(base::Bind(&StartChildApp)); 160 service_manager::RunStandaloneService(base::Bind(&StartChildApp));
156 *exit_code = 0; 161 *exit_code = 0;
157 return true; 162 return true;
158 } 163 }
159 164
160 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); 165 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2);
161 MashTestLauncherDelegate delegate; 166 MashTestLauncherDelegate delegate;
162 // --single_process and no primoridal pipe token indicate we were run directly 167 // --single_process and no primoridal pipe token indicate we were run directly
163 // from the command line. In this case we have to start up 168 // from the command line. In this case we have to start up
164 // ServiceManagerConnection 169 // ServiceManagerConnection
165 // as though we were embedded. 170 // as though we were embedded.
166 content::ServiceManagerConnection::Factory service_manager_connection_factory; 171 content::ServiceManagerConnection::Factory service_manager_connection_factory;
167 if (command_line.HasSwitch(content::kSingleProcessTestsFlag) && 172 if (command_line.HasSwitch(content::kSingleProcessTestsFlag) &&
168 !command_line.HasSwitch(switches::kPrimordialPipeToken)) { 173 !command_line.HasSwitch(switches::kPrimordialPipeToken)) {
169 service_manager_connection_factory = 174 service_manager_connection_factory =
170 base::Bind(&CreateServiceManagerConnection, &delegate); 175 base::Bind(&CreateServiceManagerConnection, &delegate);
171 content::ServiceManagerConnection::SetFactoryForTest( 176 content::ServiceManagerConnection::SetFactoryForTest(
172 &service_manager_connection_factory); 177 &service_manager_connection_factory);
173 } 178 }
174 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); 179 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv);
175 return true; 180 return true;
176 } 181 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698