Chromium Code Reviews| 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 ASH_MUS_TEST_WM_TEST_BASE_H_ | 5 #ifndef ASH_MUS_TEST_WM_TEST_BASE_H_ |
| 6 #define ASH_MUS_TEST_WM_TEST_BASE_H_ | 6 #define ASH_MUS_TEST_WM_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "ui/display/display.h" | |
| 13 #include "ui/wm/public/window_types.h" | 14 #include "ui/wm/public/window_types.h" |
| 14 | 15 |
| 15 namespace display { | 16 namespace display { |
| 16 class Display; | 17 class Display; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| 20 class Rect; | 21 class Rect; |
| 21 } | 22 } |
| 22 | 23 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 51 display::Display GetPrimaryDisplay(); | 52 display::Display GetPrimaryDisplay(); |
| 52 display::Display GetSecondaryDisplay(); | 53 display::Display GetSecondaryDisplay(); |
| 53 | 54 |
| 54 // Creates a top level window visible window in the appropriate container. | 55 // Creates a top level window visible window in the appropriate container. |
| 55 // NOTE: you can explicitly destroy the returned value if necessary, but it | 56 // NOTE: you can explicitly destroy the returned value if necessary, but it |
| 56 // will also be automatically destroyed when the WindowTreeClient is | 57 // will also be automatically destroyed when the WindowTreeClient is |
| 57 // destroyed. | 58 // destroyed. |
| 58 ui::Window* CreateTestWindow(const gfx::Rect& bounds); | 59 ui::Window* CreateTestWindow(const gfx::Rect& bounds); |
| 59 ui::Window* CreateTestWindow(const gfx::Rect& bounds, | 60 ui::Window* CreateTestWindow(const gfx::Rect& bounds, |
| 60 ui::wm::WindowType window_type); | 61 ui::wm::WindowType window_type); |
| 61 ui::Window* CreateFullscreenTestWindow(); | 62 |
| 63 // Creates a full screen visbiel top level window window By default, | |
|
mfomitchev
2016/11/22 22:53:16
- visible
- missing period
- don't explain the def
thanhph
2016/11/22 23:18:02
Done, thanks!
| |
| 64 // if display_id value is not provided, kInvalidDisplayID is used to set as | |
| 65 // the display id for mus window. | |
| 66 ui::Window* CreateFullscreenTestWindow( | |
| 67 int64_t display_id = display::Display::kInvalidDisplayID); | |
| 62 | 68 |
| 63 // Creates a window parented to |parent|. The returned window is visible. | 69 // Creates a window parented to |parent|. The returned window is visible. |
| 64 ui::Window* CreateChildTestWindow(ui::Window* parent, | 70 ui::Window* CreateChildTestWindow(ui::Window* parent, |
| 65 const gfx::Rect& bounds); | 71 const gfx::Rect& bounds); |
| 66 | 72 |
| 67 protected: | 73 protected: |
| 68 // testing::Test: | 74 // testing::Test: |
| 69 void SetUp() override; | 75 void SetUp() override; |
| 70 void TearDown() override; | 76 void TearDown() override; |
| 71 | 77 |
| 72 private: | 78 private: |
| 73 friend class AshTestImplMus; | 79 friend class AshTestImplMus; |
| 74 | 80 |
| 75 bool setup_called_ = false; | 81 bool setup_called_ = false; |
| 76 bool teardown_called_ = false; | 82 bool teardown_called_ = false; |
| 77 std::unique_ptr<WmTestHelper> test_helper_; | 83 std::unique_ptr<WmTestHelper> test_helper_; |
| 78 | 84 |
| 79 DISALLOW_COPY_AND_ASSIGN(WmTestBase); | 85 DISALLOW_COPY_AND_ASSIGN(WmTestBase); |
| 80 }; | 86 }; |
| 81 | 87 |
| 82 } // namespace mus | 88 } // namespace mus |
| 83 } // namespace ash | 89 } // namespace ash |
| 84 | 90 |
| 85 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_ | 91 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_ |
| OLD | NEW |