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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 class DragWindowResizerTest : public test::AshTestBase { | 34 class DragWindowResizerTest : public test::AshTestBase { |
35 public: | 35 public: |
36 DragWindowResizerTest() {} | 36 DragWindowResizerTest() {} |
37 virtual ~DragWindowResizerTest() {} | 37 virtual ~DragWindowResizerTest() {} |
38 | 38 |
39 virtual void SetUp() OVERRIDE { | 39 virtual void SetUp() OVERRIDE { |
40 AshTestBase::SetUp(); | 40 AshTestBase::SetUp(); |
41 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); | 41 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); |
42 | 42 |
43 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); | 43 aura::Window* root = Shell::GetPrimaryRootWindow(); |
44 gfx::Rect root_bounds(root->bounds()); | 44 gfx::Rect root_bounds(root->bounds()); |
45 EXPECT_EQ(kRootHeight, root_bounds.height()); | 45 EXPECT_EQ(kRootHeight, root_bounds.height()); |
46 EXPECT_EQ(800, root_bounds.width()); | 46 EXPECT_EQ(800, root_bounds.width()); |
47 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); | 47 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
48 window_.reset(new aura::Window(&delegate_)); | 48 window_.reset(new aura::Window(&delegate_)); |
49 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 49 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); |
50 window_->Init(ui::LAYER_NOT_DRAWN); | 50 window_->Init(ui::LAYER_NOT_DRAWN); |
51 ParentWindowInPrimaryRootWindow(window_.get()); | 51 ParentWindowInPrimaryRootWindow(window_.get()); |
52 window_->set_id(1); | 52 window_->set_id(1); |
53 | 53 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 ASSERT_TRUE(resizer.get()); | 561 ASSERT_TRUE(resizer.get()); |
562 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); | 562 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); |
563 EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], | 563 EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], |
564 gfx::Point(399, 200))); | 564 gfx::Point(399, 200))); |
565 resizer->CompleteDrag(0); | 565 resizer->CompleteDrag(0); |
566 } | 566 } |
567 } | 567 } |
568 | 568 |
569 } // namespace internal | 569 } // namespace internal |
570 } // namespace ash | 570 } // namespace ash |
OLD | NEW |