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

Unified Diff: chrome/test/base/mash_browser_tests_main.cc

Issue 2707013003: mash: Add --use-test-config for mash_browser_tests. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/mash_browser_tests_main.cc
diff --git a/chrome/test/base/mash_browser_tests_main.cc b/chrome/test/base/mash_browser_tests_main.cc
index 7e01188225c2c0ac15529abfe9f6afe691e6c221..a97abff5e4f0202ba134df42e16856e1d2e81f4e 100644
--- a/chrome/test/base/mash_browser_tests_main.cc
+++ b/chrome/test/base/mash_browser_tests_main.cc
@@ -34,6 +34,7 @@
#include "services/service_manager/public/cpp/standalone_service/standalone_service.h"
#include "services/service_manager/runner/common/switches.h"
#include "services/service_manager/runner/init.h"
+#include "services/ui/common/switches.h"
#include "ui/aura/env.h"
namespace {
@@ -170,12 +171,11 @@ void StartChildApp(service_manager::mojom::ServiceRequest service_request) {
bool RunMashBrowserTests(int argc, char** argv, int* exit_code) {
base::CommandLine::Init(argc, argv);
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- if (!command_line.HasSwitch("run-in-mash"))
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch("run-in-mash"))
return false;
- if (command_line.HasSwitch(MojoTestConnector::kMashApp)) {
+ if (command_line->HasSwitch(MojoTestConnector::kMashApp)) {
#if defined(OS_LINUX)
base::AtExitManager exit_manager;
#endif
@@ -185,6 +185,7 @@ bool RunMashBrowserTests(int argc, char** argv, int* exit_code) {
base::debug::EnableInProcessStackDumping();
#endif
+ command_line->AppendSwitch(ui::switches::kUseTestConfig);
service_manager::RunStandaloneService(base::Bind(&StartChildApp));
*exit_code = 0;
return true;
@@ -197,8 +198,8 @@ bool RunMashBrowserTests(int argc, char** argv, int* exit_code) {
// ServiceManagerConnection
// as though we were embedded.
content::ServiceManagerConnection::Factory service_manager_connection_factory;
- if (command_line.HasSwitch(content::kSingleProcessTestsFlag) &&
- !command_line.HasSwitch(switches::kPrimordialPipeToken)) {
+ if (command_line->HasSwitch(content::kSingleProcessTestsFlag) &&
+ !command_line->HasSwitch(switches::kPrimordialPipeToken)) {
service_manager_connection_factory =
base::Bind(&CreateServiceManagerConnection, &delegate);
content::ServiceManagerConnection::SetFactoryForTest(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698