| 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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/mus/public/cpp/window_tree_delegate.h" | 9 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 10 #include "components/mus/public/interfaces/window_tree.mojom.h" | 10 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // explicitly quiting that, but use this for times when that is not possible. | 38 // explicitly quiting that, but use this for times when that is not possible. |
| 39 static bool DoRunLoopWithTimeout() WARN_UNUSED_RESULT; | 39 static bool DoRunLoopWithTimeout() WARN_UNUSED_RESULT; |
| 40 | 40 |
| 41 // Quits a run loop started by DoRunLoopWithTimeout(). Returns true on | 41 // Quits a run loop started by DoRunLoopWithTimeout(). Returns true on |
| 42 // success, false if a RunLoop isn't running. | 42 // success, false if a RunLoop isn't running. |
| 43 static bool QuitRunLoop() WARN_UNUSED_RESULT; | 43 static bool QuitRunLoop() WARN_UNUSED_RESULT; |
| 44 | 44 |
| 45 WindowTreeConnection* window_manager() { return window_manager_; } | 45 WindowTreeConnection* window_manager() { return window_manager_; } |
| 46 | 46 |
| 47 protected: | 47 protected: |
| 48 mojom::WindowTreeHost* host() { return host_.get(); } |
| 48 WindowTreeConnection* most_recent_connection() { | 49 WindowTreeConnection* most_recent_connection() { |
| 49 return most_recent_connection_; | 50 return most_recent_connection_; |
| 50 } | 51 } |
| 51 | 52 |
| 52 // testing::Test: | 53 // testing::Test: |
| 53 void SetUp() override; | 54 void SetUp() override; |
| 54 void TearDown() override; | 55 void TearDown() override; |
| 55 | 56 |
| 56 // test::ApplicationTestBase: | 57 // test::ApplicationTestBase: |
| 57 mojo::ApplicationDelegate* GetApplicationDelegate() override; | 58 mojo::ApplicationDelegate* GetApplicationDelegate() override; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 80 WindowTreeConnection* window_manager_; | 81 WindowTreeConnection* window_manager_; |
| 81 | 82 |
| 82 bool window_tree_connection_destroyed_; | 83 bool window_tree_connection_destroyed_; |
| 83 | 84 |
| 84 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); | 85 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace mus | 88 } // namespace mus |
| 88 | 89 |
| 89 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 90 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
| OLD | NEW |