OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/common/wm/panels/panel_window_resizer.h" | 5 #include "ash/common/wm/panels/panel_window_resizer.h" |
6 | 6 |
7 #include "ash/common/shelf/shelf_layout_manager.h" | 7 #include "ash/common/shelf/shelf_layout_manager.h" |
8 #include "ash/common/shelf/shelf_model.h" | 8 #include "ash/common/shelf/shelf_model.h" |
9 #include "ash/common/shelf/shelf_widget.h" | 9 #include "ash/common/shelf/shelf_widget.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 namespace ash { | 34 namespace ash { |
35 | 35 |
36 class PanelWindowResizerTest : public test::AshTestBase { | 36 class PanelWindowResizerTest : public test::AshTestBase { |
37 public: | 37 public: |
38 PanelWindowResizerTest() {} | 38 PanelWindowResizerTest() {} |
39 ~PanelWindowResizerTest() override {} | 39 ~PanelWindowResizerTest() override {} |
40 | 40 |
41 void SetUp() override { | 41 void SetUp() override { |
42 AshTestBase::SetUp(); | 42 AshTestBase::SetUp(); |
43 UpdateDisplay("600x400"); | 43 UpdateDisplay("600x400"); |
44 model_ = WmShell::Get()->shelf_model(); | 44 model_ = Shell::Get()->shelf_model(); |
45 } | 45 } |
46 | 46 |
47 void TearDown() override { AshTestBase::TearDown(); } | 47 void TearDown() override { AshTestBase::TearDown(); } |
48 | 48 |
49 protected: | 49 protected: |
50 gfx::Point CalculateDragPoint(const WindowResizer& resizer, | 50 gfx::Point CalculateDragPoint(const WindowResizer& resizer, |
51 int delta_x, | 51 int delta_x, |
52 int delta_y) const { | 52 int delta_y) const { |
53 gfx::Point location = resizer.GetInitialLocation(); | 53 gfx::Point location = resizer.GetInitialLocation(); |
54 location.set_x(location.x() + delta_x); | 54 location.set_x(location.x() + delta_x); |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 INSTANTIATE_TEST_CASE_P(LtrRtl, | 555 INSTANTIATE_TEST_CASE_P(LtrRtl, |
556 PanelWindowResizerTextDirectionTest, | 556 PanelWindowResizerTextDirectionTest, |
557 testing::Bool()); | 557 testing::Bool()); |
558 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, | 558 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, |
559 PanelWindowResizerTransientTest, | 559 PanelWindowResizerTransientTest, |
560 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 560 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
561 ui::wm::WINDOW_TYPE_PANEL, | 561 ui::wm::WINDOW_TYPE_PANEL, |
562 ui::wm::WINDOW_TYPE_POPUP)); | 562 ui::wm::WINDOW_TYPE_POPUP)); |
563 | 563 |
564 } // namespace ash | 564 } // namespace ash |
OLD | NEW |