| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/mus/public/cpp/tests/window_server_test_base.h" | 5 #include "components/mus/public/cpp/tests/window_server_test_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void WindowServerTestBase::TearDown() { | 72 void WindowServerTestBase::TearDown() { |
| 73 ApplicationTestBase::TearDown(); | 73 ApplicationTestBase::TearDown(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 mojo::ApplicationDelegate* WindowServerTestBase::GetApplicationDelegate() { | 76 mojo::ApplicationDelegate* WindowServerTestBase::GetApplicationDelegate() { |
| 77 return this; | 77 return this; |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool WindowServerTestBase::ConfigureIncomingConnection( | 80 bool WindowServerTestBase::ConfigureIncomingConnection( |
| 81 mojo::ApplicationConnection* connection) { | 81 mojo::ApplicationConnection* connection) { |
| 82 connection->AddService<mojo::ViewTreeClient>(this); | 82 connection->AddService<mojom::WindowTreeClient>(this); |
| 83 return true; | 83 return true; |
| 84 } | 84 } |
| 85 | 85 |
| 86 void WindowServerTestBase::OnEmbed(Window* root) { | 86 void WindowServerTestBase::OnEmbed(Window* root) { |
| 87 most_recent_connection_ = root->connection(); | 87 most_recent_connection_ = root->connection(); |
| 88 EXPECT_TRUE(QuitRunLoop()); | 88 EXPECT_TRUE(QuitRunLoop()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void WindowServerTestBase::OnConnectionLost(WindowTreeConnection* connection) { | 91 void WindowServerTestBase::OnConnectionLost(WindowTreeConnection* connection) { |
| 92 window_tree_connection_destroyed_ = true; | 92 window_tree_connection_destroyed_ = true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void WindowServerTestBase::Create( | 95 void WindowServerTestBase::Create( |
| 96 mojo::ApplicationConnection* connection, | 96 mojo::ApplicationConnection* connection, |
| 97 mojo::InterfaceRequest<mojo::ViewTreeClient> request) { | 97 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { |
| 98 WindowTreeConnection::Create( | 98 WindowTreeConnection::Create( |
| 99 this, request.Pass(), | 99 this, request.Pass(), |
| 100 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); | 100 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace mus | 103 } // namespace mus |
| OLD | NEW |