| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ash_constants.h" | 5 #include "ash/common/ash_constants.h" |
| 6 #include "ash/common/frame/custom_frame_view_ash.h" | 6 #include "ash/common/frame/custom_frame_view_ash.h" |
| 7 #include "ash/common/wm/window_state.h" | 7 #include "ash/common/wm/window_state.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/test/cursor_manager_test_api.h" | 10 #include "ash/test/cursor_manager_test_api.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public: | 29 public: |
| 30 TestWidgetDelegate() {} | 30 TestWidgetDelegate() {} |
| 31 ~TestWidgetDelegate() override {} | 31 ~TestWidgetDelegate() override {} |
| 32 | 32 |
| 33 // views::WidgetDelegateView overrides: | 33 // views::WidgetDelegateView overrides: |
| 34 bool CanResize() const override { return true; } | 34 bool CanResize() const override { return true; } |
| 35 bool CanMaximize() const override { return true; } | 35 bool CanMaximize() const override { return true; } |
| 36 bool CanMinimize() const override { return true; } | 36 bool CanMinimize() const override { return true; } |
| 37 views::NonClientFrameView* CreateNonClientFrameView( | 37 views::NonClientFrameView* CreateNonClientFrameView( |
| 38 views::Widget* widget) override { | 38 views::Widget* widget) override { |
| 39 return new ash::CustomFrameViewAsh(widget); | 39 return new CustomFrameViewAsh(widget); |
| 40 } | 40 } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); | 43 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| 48 // The test tests that the mouse cursor is changed and that the resize shadows | 48 // The test tests that the mouse cursor is changed and that the resize shadows |
| 49 // are shown when the mouse is hovered over the window edge. | 49 // are shown when the mouse is hovered over the window edge. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 generator.MoveMouseTo(200, 50); | 213 generator.MoveMouseTo(200, 50); |
| 214 EXPECT_EQ(HTRIGHT, ResizeShadowHitTest()); | 214 EXPECT_EQ(HTRIGHT, ResizeShadowHitTest()); |
| 215 EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType()); | 215 EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType()); |
| 216 generator.MoveMouseTo(200 - ash::kResizeInsideBoundsSize, 50); | 216 generator.MoveMouseTo(200 - ash::kResizeInsideBoundsSize, 50); |
| 217 EXPECT_EQ(HTRIGHT, ResizeShadowHitTest()); | 217 EXPECT_EQ(HTRIGHT, ResizeShadowHitTest()); |
| 218 EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType()); | 218 EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType()); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace test | 221 } // namespace test |
| 222 } // namespace ash | 222 } // namespace ash |
| OLD | NEW |