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/workspace/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
10 #include "ui/aura/screen_aura.h" | 10 #include "ui/aura/screen_aura.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 WorkspaceWindowResizerTest() : window_(NULL) {} | 44 WorkspaceWindowResizerTest() : window_(NULL) {} |
45 virtual ~WorkspaceWindowResizerTest() {} | 45 virtual ~WorkspaceWindowResizerTest() {} |
46 | 46 |
47 virtual void SetUp() OVERRIDE { | 47 virtual void SetUp() OVERRIDE { |
48 WorkspaceWindowResizer::SetScaleWindowsForTest(false); | 48 WorkspaceWindowResizer::SetScaleWindowsForTest(false); |
49 AshTestBase::SetUp(); | 49 AshTestBase::SetUp(); |
50 aura::RootWindow* root = Shell::GetInstance()->GetRootWindow(); | 50 aura::RootWindow* root = Shell::GetInstance()->GetRootWindow(); |
51 root->SetBounds(gfx::Rect(0, 0, 800, kRootHeight)); | 51 root->SetBounds(gfx::Rect(0, 0, 800, kRootHeight)); |
52 gfx::Rect root_bounds(root->bounds()); | 52 gfx::Rect root_bounds(root->bounds()); |
53 EXPECT_EQ(kRootHeight, root_bounds.height()); | 53 EXPECT_EQ(kRootHeight, root_bounds.height()); |
54 root->screen()->set_work_area_insets(gfx::Insets()); | 54 root->SetScreenWorkAreaInsets(gfx::Insets()); |
55 window_.reset(new aura::Window(&delegate_)); | 55 window_.reset(new aura::Window(&delegate_)); |
56 window_->Init(ui::Layer::LAYER_NOT_DRAWN); | 56 window_->Init(ui::Layer::LAYER_NOT_DRAWN); |
57 window_->SetParent(Shell::GetInstance()->GetRootWindow()); | 57 window_->SetParent(Shell::GetInstance()->GetRootWindow()); |
58 } | 58 } |
59 | 59 |
60 virtual void TearDown() OVERRIDE { | 60 virtual void TearDown() OVERRIDE { |
61 WorkspaceWindowResizer::SetScaleWindowsForTest(true); | 61 WorkspaceWindowResizer::SetScaleWindowsForTest(true); |
62 window_.reset(); | 62 window_.reset(); |
63 AshTestBase::TearDown(); | 63 AshTestBase::TearDown(); |
64 } | 64 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 267 |
268 resizer.Drag(CalculateDragPoint(resizer, -100)); | 268 resizer.Drag(CalculateDragPoint(resizer, -100)); |
269 EXPECT_EQ(200, window_->bounds().y()); | 269 EXPECT_EQ(200, window_->bounds().y()); |
270 EXPECT_EQ(300, window_->bounds().height()); | 270 EXPECT_EQ(300, window_->bounds().height()); |
271 } | 271 } |
272 } | 272 } |
273 | 273 |
274 } // namespace | 274 } // namespace |
275 } // namespace test | 275 } // namespace test |
276 } // namespace aura | 276 } // namespace aura |
OLD | NEW |