OLD | NEW |
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 14 matching lines...) Expand all Loading... |
25 #include "services/shell/public/cpp/service_context.h" | 25 #include "services/shell/public/cpp/service_context.h" |
26 #include "services/shell/public/cpp/service_runner.h" | 26 #include "services/shell/public/cpp/service_runner.h" |
27 #include "services/shell/runner/common/switches.h" | 27 #include "services/shell/runner/common/switches.h" |
28 #include "services/shell/runner/host/child_process.h" | 28 #include "services/shell/runner/host/child_process.h" |
29 #include "services/shell/runner/host/child_process_base.h" | 29 #include "services/shell/runner/host/child_process_base.h" |
30 #include "services/shell/runner/init.h" | 30 #include "services/shell/runner/init.h" |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 void ConnectToDefaultApps(shell::Connector* connector) { | 34 void ConnectToDefaultApps(shell::Connector* connector) { |
35 connector->Connect("mojo:mash_session"); | 35 connector->Connect("service:mash_session"); |
36 } | 36 } |
37 | 37 |
38 class MashTestSuite : public ChromeTestSuite { | 38 class MashTestSuite : public ChromeTestSuite { |
39 public: | 39 public: |
40 MashTestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} | 40 MashTestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} |
41 | 41 |
42 void SetMojoTestConnector(std::unique_ptr<MojoTestConnector> connector) { | 42 void SetMojoTestConnector(std::unique_ptr<MojoTestConnector> connector) { |
43 mojo_test_connector_ = std::move(connector); | 43 mojo_test_connector_ = std::move(connector); |
44 } | 44 } |
45 MojoTestConnector* mojo_test_connector() { | 45 MojoTestConnector* mojo_test_connector() { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 content::MojoShellConnection::Factory shell_connection_factory; | 175 content::MojoShellConnection::Factory shell_connection_factory; |
176 if (command_line.HasSwitch(content::kSingleProcessTestsFlag) && | 176 if (command_line.HasSwitch(content::kSingleProcessTestsFlag) && |
177 !command_line.HasSwitch(switches::kPrimordialPipeToken)) { | 177 !command_line.HasSwitch(switches::kPrimordialPipeToken)) { |
178 shell_connection_factory = | 178 shell_connection_factory = |
179 base::Bind(&CreateMojoShellConnection, &delegate); | 179 base::Bind(&CreateMojoShellConnection, &delegate); |
180 content::MojoShellConnection::SetFactoryForTest(&shell_connection_factory); | 180 content::MojoShellConnection::SetFactoryForTest(&shell_connection_factory); |
181 } | 181 } |
182 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); | 182 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); |
183 return true; | 183 return true; |
184 } | 184 } |
OLD | NEW |