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 "ui/views/mus/views_mus_test_suite.h" | 5 #include "ui/views/mus/views_mus_test_suite.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 context_ = base::MakeUnique<service_manager::ServiceContext>( | 198 context_ = base::MakeUnique<service_manager::ServiceContext>( |
199 base::MakeUnique<DefaultService>(), | 199 base::MakeUnique<DefaultService>(), |
200 service_manager::mojom::ServiceRequest(&service)); | 200 service_manager::mojom::ServiceRequest(&service)); |
201 background_service_manager_->RegisterService( | 201 background_service_manager_->RegisterService( |
202 service_manager::Identity( | 202 service_manager::Identity( |
203 GetTestName(), service_manager::mojom::kRootUserID), | 203 GetTestName(), service_manager::mojom::kRootUserID), |
204 std::move(service), nullptr); | 204 std::move(service), nullptr); |
205 | 205 |
206 // ui/views/mus requires a WindowManager running, so launch test_wm. | 206 // ui/views/mus requires a WindowManager running, so launch test_wm. |
207 service_manager::Connector* connector = context_->connector(); | 207 service_manager::Connector* connector = context_->connector(); |
208 connector->Connect("test_wm"); | 208 connector->StartService("test_wm"); |
209 service_manager_connector_ = connector->Clone(); | 209 service_manager_connector_ = connector->Clone(); |
210 service_manager_identity_ = context_->identity(); | 210 service_manager_identity_ = context_->identity(); |
211 wait->Signal(); | 211 wait->Signal(); |
212 } | 212 } |
213 | 213 |
214 void TearDownConnections(base::WaitableEvent* wait) { | 214 void TearDownConnections(base::WaitableEvent* wait) { |
215 context_.reset(); | 215 context_.reset(); |
216 wait->Signal(); | 216 wait->Signal(); |
217 } | 217 } |
218 | 218 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 ViewsTestSuite::Initialize(); | 255 ViewsTestSuite::Initialize(); |
256 service_manager_connections_ = base::MakeUnique<ServiceManagerConnection>(); | 256 service_manager_connections_ = base::MakeUnique<ServiceManagerConnection>(); |
257 } | 257 } |
258 | 258 |
259 void ViewsMusTestSuite::Shutdown() { | 259 void ViewsMusTestSuite::Shutdown() { |
260 service_manager_connections_.reset(); | 260 service_manager_connections_.reset(); |
261 ViewsTestSuite::Shutdown(); | 261 ViewsTestSuite::Shutdown(); |
262 } | 262 } |
263 | 263 |
264 } // namespace views | 264 } // namespace views |
OLD | NEW |