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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 void SetUpConnections(base::WaitableEvent* wait) { | 117 void SetUpConnections(base::WaitableEvent* wait) { |
118 background_shell_ = base::MakeUnique<shell::BackgroundShell>(); | 118 background_shell_ = base::MakeUnique<shell::BackgroundShell>(); |
119 background_shell_->Init(nullptr); | 119 background_shell_->Init(nullptr); |
120 service_ = base::MakeUnique<DefaultService>(); | 120 service_ = base::MakeUnique<DefaultService>(); |
121 shell_connection_ = base::MakeUnique<shell::ServiceContext>( | 121 shell_connection_ = base::MakeUnique<shell::ServiceContext>( |
122 service_.get(), background_shell_->CreateServiceRequest(GetTestName())); | 122 service_.get(), background_shell_->CreateServiceRequest(GetTestName())); |
123 | 123 |
124 // ui/views/mus requires a WindowManager running, so launch test_wm. | 124 // ui/views/mus requires a WindowManager running, so launch test_wm. |
125 shell::Connector* connector = shell_connection_->connector(); | 125 shell::Connector* connector = shell_connection_->connector(); |
126 connector->Connect("mojo:test_wm"); | 126 connector->Connect("service:test_wm"); |
127 shell_connector_ = connector->Clone(); | 127 shell_connector_ = connector->Clone(); |
128 shell_identity_ = shell_connection_->identity(); | 128 shell_identity_ = shell_connection_->identity(); |
129 wait->Signal(); | 129 wait->Signal(); |
130 } | 130 } |
131 | 131 |
132 void TearDownConnections(base::WaitableEvent* wait) { | 132 void TearDownConnections(base::WaitableEvent* wait) { |
133 shell_connection_.reset(); | 133 shell_connection_.reset(); |
134 wait->Signal(); | 134 wait->Signal(); |
135 } | 135 } |
136 | 136 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 ViewsTestSuite::Initialize(); | 168 ViewsTestSuite::Initialize(); |
169 shell_connections_ = base::MakeUnique<ShellConnection>(); | 169 shell_connections_ = base::MakeUnique<ShellConnection>(); |
170 } | 170 } |
171 | 171 |
172 void ViewsMusTestSuite::Shutdown() { | 172 void ViewsMusTestSuite::Shutdown() { |
173 shell_connections_.reset(); | 173 shell_connections_.reset(); |
174 ViewsTestSuite::Shutdown(); | 174 ViewsTestSuite::Shutdown(); |
175 } | 175 } |
176 | 176 |
177 } // namespace views | 177 } // namespace views |
OLD | NEW |