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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public: | 43 public: |
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 AshTestBase::SetUp(); | 48 AshTestBase::SetUp(); |
49 aura::RootWindow* root = Shell::GetInstance()->GetRootWindow(); | 49 aura::RootWindow* root = Shell::GetInstance()->GetRootWindow(); |
50 root->SetBounds(gfx::Rect(0, 0, 800, kRootHeight)); | 50 root->SetBounds(gfx::Rect(0, 0, 800, kRootHeight)); |
51 gfx::Rect root_bounds(root->bounds()); | 51 gfx::Rect root_bounds(root->bounds()); |
52 EXPECT_EQ(kRootHeight, root_bounds.height()); | 52 EXPECT_EQ(kRootHeight, root_bounds.height()); |
53 root->screen()->set_work_area_insets(gfx::Insets()); | 53 root->SetScreenWorkAreaInsets(gfx::Insets()); |
54 window_.reset(new aura::Window(&delegate_)); | 54 window_.reset(new aura::Window(&delegate_)); |
55 window_->Init(ui::Layer::LAYER_NOT_DRAWN); | 55 window_->Init(ui::Layer::LAYER_NOT_DRAWN); |
56 window_->SetParent(Shell::GetInstance()->GetRootWindow()); | 56 window_->SetParent(Shell::GetInstance()->GetRootWindow()); |
57 } | 57 } |
58 | 58 |
59 virtual void TearDown() OVERRIDE { | 59 virtual void TearDown() OVERRIDE { |
60 window_.reset(); | 60 window_.reset(); |
61 AshTestBase::TearDown(); | 61 AshTestBase::TearDown(); |
62 } | 62 } |
63 | 63 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 resizer.Drag(CalculateDragPoint(resizer, -100)); | 266 resizer.Drag(CalculateDragPoint(resizer, -100)); |
267 EXPECT_EQ(200, window_->bounds().y()); | 267 EXPECT_EQ(200, window_->bounds().y()); |
268 EXPECT_EQ(300, window_->bounds().height()); | 268 EXPECT_EQ(300, window_->bounds().height()); |
269 } | 269 } |
270 } | 270 } |
271 | 271 |
272 } // namespace | 272 } // namespace |
273 } // namespace test | 273 } // namespace test |
274 } // namespace aura | 274 } // namespace aura |
OLD | NEW |