| 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/multi_window_resize_controller.h" | 5 #include "ash/wm/workspace/multi_window_resize_controller.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 "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "ash/wm/workspace_controller.h" | 10 #include "ash/wm/workspace_controller.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class MultiWindowResizeControllerTest : public test::AshTestBase { | 24 class MultiWindowResizeControllerTest : public test::AshTestBase { |
| 25 public: | 25 public: |
| 26 MultiWindowResizeControllerTest() : resize_controller_(NULL) {} | 26 MultiWindowResizeControllerTest() : resize_controller_(NULL) {} |
| 27 virtual ~MultiWindowResizeControllerTest() {} | 27 virtual ~MultiWindowResizeControllerTest() {} |
| 28 | 28 |
| 29 virtual void SetUp() OVERRIDE { | 29 virtual void SetUp() OVERRIDE { |
| 30 test::AshTestBase::SetUp(); | 30 test::AshTestBase::SetUp(); |
| 31 WorkspaceController* wc = | 31 WorkspaceController* wc = |
| 32 ash::Shell::TestApi(Shell::GetInstance()).workspace_controller(); | 32 ash::Shell::TestApi(Shell::GetInstance()).workspace_controller(); |
| 33 wc->SetGridSize(0); | |
| 34 WorkspaceEventFilter* event_filter = | 33 WorkspaceEventFilter* event_filter = |
| 35 WorkspaceControllerTestHelper(wc).GetFilter(); | 34 WorkspaceControllerTestHelper(wc).GetFilter(); |
| 36 resize_controller_ = WorkspaceEventFilterTestHelper(event_filter). | 35 resize_controller_ = WorkspaceEventFilterTestHelper(event_filter). |
| 37 resize_controller(); | 36 resize_controller(); |
| 38 } | 37 } |
| 39 | 38 |
| 40 protected: | 39 protected: |
| 41 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate, | 40 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate, |
| 42 const gfx::Rect& bounds) { | 41 const gfx::Rect& bounds) { |
| 43 aura::Window* window = new aura::Window(delegate); | 42 aura::Window* window = new aura::Window(delegate); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 EXPECT_TRUE(HasTarget(w3.get())); | 247 EXPECT_TRUE(HasTarget(w3.get())); |
| 249 | 248 |
| 250 // Release the mouse. The resizer should still be visible and a subsequent | 249 // Release the mouse. The resizer should still be visible and a subsequent |
| 251 // press should not trigger a DCHECK. | 250 // press should not trigger a DCHECK. |
| 252 generator.ReleaseLeftButton(); | 251 generator.ReleaseLeftButton(); |
| 253 EXPECT_TRUE(IsShowing()); | 252 EXPECT_TRUE(IsShowing()); |
| 254 generator.PressLeftButton(); | 253 generator.PressLeftButton(); |
| 255 } | 254 } |
| 256 } // namespace internal | 255 } // namespace internal |
| 257 } // namespace ash | 256 } // namespace ash |
| OLD | NEW |