| 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/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
| 10 #include "ash/common/wm/window_positioning_utils.h" | 10 #include "ash/common/wm/window_positioning_utils.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 void SetUp() override { | 72 void SetUp() override { |
| 73 AshMDTestBase::SetUp(); | 73 AshMDTestBase::SetUp(); |
| 74 | 74 |
| 75 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); | 75 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); |
| 76 | 76 |
| 77 aura::Window* root = Shell::GetPrimaryRootWindow(); | 77 aura::Window* root = Shell::GetPrimaryRootWindow(); |
| 78 gfx::Rect root_bounds(root->bounds()); | 78 gfx::Rect root_bounds(root->bounds()); |
| 79 EXPECT_EQ(kRootHeight, root_bounds.height()); | 79 EXPECT_EQ(kRootHeight, root_bounds.height()); |
| 80 EXPECT_EQ(800, root_bounds.width()); | 80 EXPECT_EQ(800, root_bounds.width()); |
| 81 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); | |
| 82 window_.reset(new aura::Window(&delegate_)); | 81 window_.reset(new aura::Window(&delegate_)); |
| 83 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 82 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 84 window_->Init(ui::LAYER_NOT_DRAWN); | 83 window_->Init(ui::LAYER_NOT_DRAWN); |
| 85 ParentWindowInPrimaryRootWindow(window_.get()); | 84 ParentWindowInPrimaryRootWindow(window_.get()); |
| 86 window_->set_id(1); | 85 window_->set_id(1); |
| 87 | 86 |
| 88 always_on_top_window_.reset(new aura::Window(&delegate2_)); | 87 always_on_top_window_.reset(new aura::Window(&delegate2_)); |
| 89 always_on_top_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 88 always_on_top_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 90 always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true); | 89 always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true); |
| 91 always_on_top_window_->Init(ui::LAYER_NOT_DRAWN); | 90 always_on_top_window_->Init(ui::LAYER_NOT_DRAWN); |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 ASSERT_TRUE(resizer.get()); | 780 ASSERT_TRUE(resizer.get()); |
| 782 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); | 781 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); |
| 783 EXPECT_TRUE(TestIfMouseWarpsAt(gfx::Point(399, 200))); | 782 EXPECT_TRUE(TestIfMouseWarpsAt(gfx::Point(399, 200))); |
| 784 EXPECT_EQ("401,200", | 783 EXPECT_EQ("401,200", |
| 785 aura::Env::GetInstance()->last_mouse_location().ToString()); | 784 aura::Env::GetInstance()->last_mouse_location().ToString()); |
| 786 resizer->CompleteDrag(); | 785 resizer->CompleteDrag(); |
| 787 } | 786 } |
| 788 } | 787 } |
| 789 | 788 |
| 790 } // namespace ash | 789 } // namespace ash |
| OLD | NEW |