| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/drag_window_resizer.h" | 5 #include "ash/wm/drag_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/display/mouse_cursor_event_filter.h" | 7 #include "ash/display/mouse_cursor_event_filter.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 namespace ash { | 25 namespace ash { |
| 26 namespace internal { | 26 namespace internal { |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const int kRootHeight = 600; | 29 const int kRootHeight = 600; |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 class DragWindowResizerTest : public test::AshTestBase { | 33 class DragWindowResizerTest : public test::AshTestBase { |
| 34 public: | 34 public: |
| 35 DragWindowResizerTest() : window_(NULL) {} | 35 DragWindowResizerTest() {} |
| 36 virtual ~DragWindowResizerTest() {} | 36 virtual ~DragWindowResizerTest() {} |
| 37 | 37 |
| 38 virtual void SetUp() OVERRIDE { | 38 virtual void SetUp() OVERRIDE { |
| 39 AshTestBase::SetUp(); | 39 AshTestBase::SetUp(); |
| 40 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); | 40 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); |
| 41 | 41 |
| 42 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); | 42 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); |
| 43 gfx::Rect root_bounds(root->bounds()); | 43 gfx::Rect root_bounds(root->bounds()); |
| 44 EXPECT_EQ(kRootHeight, root_bounds.height()); | 44 EXPECT_EQ(kRootHeight, root_bounds.height()); |
| 45 EXPECT_EQ(800, root_bounds.width()); | 45 EXPECT_EQ(800, root_bounds.width()); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 ASSERT_TRUE(resizer.get()); | 513 ASSERT_TRUE(resizer.get()); |
| 514 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); | 514 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); |
| 515 EXPECT_TRUE(event_filter->WarpMouseCursorIfNecessary(root_windows[0], | 515 EXPECT_TRUE(event_filter->WarpMouseCursorIfNecessary(root_windows[0], |
| 516 gfx::Point(399, 200))); | 516 gfx::Point(399, 200))); |
| 517 resizer->CompleteDrag(0); | 517 resizer->CompleteDrag(0); |
| 518 } | 518 } |
| 519 } | 519 } |
| 520 | 520 |
| 521 } // namespace internal | 521 } // namespace internal |
| 522 } // namespace ash | 522 } // namespace ash |
| OLD | NEW |