| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return false; | 56 return false; |
| 57 | 57 |
| 58 current_run_loop->Quit(); | 58 current_run_loop->Quit(); |
| 59 current_run_loop = nullptr; | 59 current_run_loop = nullptr; |
| 60 return true; | 60 return true; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void WindowServerTestBase::SetUp() { | 63 void WindowServerTestBase::SetUp() { |
| 64 ApplicationTestBase::SetUp(); | 64 ApplicationTestBase::SetUp(); |
| 65 | 65 |
| 66 CreateSingleWindowTreeHost(application_impl(), this, &host_); | 66 CreateSingleWindowTreeHost(application_impl(), this, &host_, nullptr); |
| 67 | 67 |
| 68 ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed(). | 68 ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed(). |
| 69 std::swap(window_manager_, most_recent_connection_); | 69 std::swap(window_manager_, most_recent_connection_); |
| 70 } | 70 } |
| 71 | 71 |
| 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() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 94 | 94 |
| 95 void WindowServerTestBase::Create( | 95 void WindowServerTestBase::Create( |
| 96 mojo::ApplicationConnection* connection, | 96 mojo::ApplicationConnection* connection, |
| 97 mojo::InterfaceRequest<mojom::WindowTreeClient> 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 |