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/debug/stack_trace.h" | 10 #include "base/debug/stack_trace.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "services/service_manager/runner/init.h" | 37 #include "services/service_manager/runner/init.h" |
38 #include "services/ui/common/switches.h" | 38 #include "services/ui/common/switches.h" |
39 #include "ui/aura/env.h" | 39 #include "ui/aura/env.h" |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 const base::FilePath::CharType kCatalogFilename[] = | 43 const base::FilePath::CharType kCatalogFilename[] = |
44 FILE_PATH_LITERAL("mash_browser_tests_catalog.json"); | 44 FILE_PATH_LITERAL("mash_browser_tests_catalog.json"); |
45 | 45 |
46 void ConnectToDefaultApps(service_manager::Connector* connector) { | 46 void ConnectToDefaultApps(service_manager::Connector* connector) { |
47 connector->Connect(mash::session::mojom::kServiceName); | 47 connector->StartService(mash::session::mojom::kServiceName); |
48 } | 48 } |
49 | 49 |
50 class MashTestSuite : public ChromeTestSuite { | 50 class MashTestSuite : public ChromeTestSuite { |
51 public: | 51 public: |
52 MashTestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} | 52 MashTestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} |
53 | 53 |
54 void SetMojoTestConnector(std::unique_ptr<MojoTestConnector> connector) { | 54 void SetMojoTestConnector(std::unique_ptr<MojoTestConnector> connector) { |
55 mojo_test_connector_ = std::move(connector); | 55 mojo_test_connector_ = std::move(connector); |
56 } | 56 } |
57 | 57 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 if (command_line->HasSwitch(content::kSingleProcessTestsFlag) && | 202 if (command_line->HasSwitch(content::kSingleProcessTestsFlag) && |
203 !command_line->HasSwitch(switches::kPrimordialPipeToken)) { | 203 !command_line->HasSwitch(switches::kPrimordialPipeToken)) { |
204 service_manager_connection_factory = | 204 service_manager_connection_factory = |
205 base::Bind(&CreateServiceManagerConnection, &delegate); | 205 base::Bind(&CreateServiceManagerConnection, &delegate); |
206 content::ServiceManagerConnection::SetFactoryForTest( | 206 content::ServiceManagerConnection::SetFactoryForTest( |
207 &service_manager_connection_factory); | 207 &service_manager_connection_factory); |
208 } | 208 } |
209 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); | 209 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); |
210 return true; | 210 return true; |
211 } | 211 } |
OLD | NEW |