| 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 #ifndef MASH_WM_TEST_WM_TEST_BASE_H_ | 5 #ifndef MASH_WM_TEST_WM_TEST_BASE_H_ |
| 6 #define MASH_WM_TEST_WM_TEST_BASE_H_ | 6 #define MASH_WM_TEST_WM_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class Window; | 24 class Window; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace mash { | 27 namespace mash { |
| 28 namespace wm { | 28 namespace wm { |
| 29 | 29 |
| 30 class RootWindowController; | 30 class RootWindowController; |
| 31 class WmTestHelper; | 31 class WmTestHelper; |
| 32 | 32 |
| 33 // Base class for window manager tests that want to configure | 33 // Base class for window manager tests that want to configure |
| 34 // WindowTreeConnection without a connection to mus. | 34 // WindowTreeClient without a client to mus. |
| 35 class WmTestBase : public testing::Test { | 35 class WmTestBase : public testing::Test { |
| 36 public: | 36 public: |
| 37 WmTestBase(); | 37 WmTestBase(); |
| 38 ~WmTestBase() override; | 38 ~WmTestBase() override; |
| 39 | 39 |
| 40 // TODO(sky): temporary until http://crbug.com/611563 is fixed. | 40 // TODO(sky): temporary until http://crbug.com/611563 is fixed. |
| 41 bool SupportsMultipleDisplays() const; | 41 bool SupportsMultipleDisplays() const; |
| 42 | 42 |
| 43 // Update the display configuration as given in |display_spec|. | 43 // Update the display configuration as given in |display_spec|. |
| 44 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. | 44 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. |
| 45 void UpdateDisplay(const std::string& display_spec); | 45 void UpdateDisplay(const std::string& display_spec); |
| 46 | 46 |
| 47 mus::Window* GetPrimaryRootWindow(); | 47 mus::Window* GetPrimaryRootWindow(); |
| 48 mus::Window* GetSecondaryRootWindow(); | 48 mus::Window* GetSecondaryRootWindow(); |
| 49 | 49 |
| 50 display::Display GetPrimaryDisplay(); | 50 display::Display GetPrimaryDisplay(); |
| 51 display::Display GetSecondaryDisplay(); | 51 display::Display GetSecondaryDisplay(); |
| 52 | 52 |
| 53 // Creates a top level window visible window in the appropriate container. | 53 // Creates a top level window visible window in the appropriate container. |
| 54 // NOTE: you can explicitly destroy the returned value if necessary, but it | 54 // NOTE: you can explicitly destroy the returned value if necessary, but it |
| 55 // will also be automatically destroyed when the WindowTreeConnection is | 55 // will also be automatically destroyed when the WindowTreeClient is |
| 56 // destroyed. | 56 // destroyed. |
| 57 mus::Window* CreateTestWindow(const gfx::Rect& bounds); | 57 mus::Window* CreateTestWindow(const gfx::Rect& bounds); |
| 58 mus::Window* CreateTestWindow(const gfx::Rect& bounds, | 58 mus::Window* CreateTestWindow(const gfx::Rect& bounds, |
| 59 ui::wm::WindowType window_type); | 59 ui::wm::WindowType window_type); |
| 60 | 60 |
| 61 // Creates a window parented to |parent|. The returned window is visible. | 61 // Creates a window parented to |parent|. The returned window is visible. |
| 62 mus::Window* CreateChildTestWindow(mus::Window* parent, | 62 mus::Window* CreateChildTestWindow(mus::Window* parent, |
| 63 const gfx::Rect& bounds); | 63 const gfx::Rect& bounds); |
| 64 | 64 |
| 65 protected: | 65 protected: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 76 bool teardown_called_ = false; | 76 bool teardown_called_ = false; |
| 77 std::unique_ptr<WmTestHelper> test_helper_; | 77 std::unique_ptr<WmTestHelper> test_helper_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(WmTestBase); | 79 DISALLOW_COPY_AND_ASSIGN(WmTestBase); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace wm | 82 } // namespace wm |
| 83 } // namespace mash | 83 } // namespace mash |
| 84 | 84 |
| 85 #endif // MASH_WM_TEST_WM_TEST_BASE_H_ | 85 #endif // MASH_WM_TEST_WM_TEST_BASE_H_ |
| OLD | NEW |