| 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/common/wm/workspace/workspace_window_resizer.h" | 5 #include "ash/common/wm/workspace/workspace_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/shelf/shelf_constants.h" | 8 #include "ash/common/shelf/shelf_constants.h" |
| 9 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 // Moving the mouse should show the cursor. | 538 // Moving the mouse should show the cursor. |
| 539 generator.MoveMouseBy(1, 1); | 539 generator.MoveMouseBy(1, 1); |
| 540 EXPECT_TRUE(shell->cursor_manager()->IsCursorVisible()); | 540 EXPECT_TRUE(shell->cursor_manager()->IsCursorVisible()); |
| 541 EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked()); | 541 EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked()); |
| 542 | 542 |
| 543 resizer->RevertDrag(); | 543 resizer->RevertDrag(); |
| 544 } | 544 } |
| 545 | 545 |
| 546 // Assertions around dragging to the left/right edge of the screen. | 546 // Assertions around dragging to the left/right edge of the screen. |
| 547 TEST_P(WorkspaceWindowResizerTest, Edge) { | 547 TEST_P(WorkspaceWindowResizerTest, Edge) { |
| 548 if (!SupportsHostWindowResize()) | |
| 549 return; | |
| 550 | |
| 551 // Resize host window to force insets update. | 548 // Resize host window to force insets update. |
| 552 UpdateDisplay("800x700"); | 549 UpdateDisplay("800x700"); |
| 553 // TODO(varkha): Insets are reset after every drag because of | 550 // TODO(varkha): Insets are reset after every drag because of |
| 554 // http://crbug.com/292238. | 551 // http://crbug.com/292238. |
| 555 // Window is wide enough not to get docked right away. | 552 // Window is wide enough not to get docked right away. |
| 556 window_->SetBounds(gfx::Rect(20, 30, 400, 60)); | 553 window_->SetBounds(gfx::Rect(20, 30, 400, 60)); |
| 557 window_->SetProperty(aura::client::kCanMaximizeKey, true); | 554 window_->SetProperty(aura::client::kCanMaximizeKey, true); |
| 558 wm::WindowState* window_state = wm::GetWindowState(window_.get()); | 555 wm::WindowState* window_state = wm::GetWindowState(window_.get()); |
| 559 | 556 |
| 560 { | 557 { |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 touch_resize_window_->bounds().ToString()); | 1880 touch_resize_window_->bounds().ToString()); |
| 1884 // Drag even more to snap to the edge. | 1881 // Drag even more to snap to the edge. |
| 1885 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), | 1882 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), |
| 1886 gfx::Point(400, kRootHeight - 25), | 1883 gfx::Point(400, kRootHeight - 25), |
| 1887 base::TimeDelta::FromMilliseconds(10), 5); | 1884 base::TimeDelta::FromMilliseconds(10), 5); |
| 1888 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), | 1885 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), |
| 1889 touch_resize_window_->bounds().ToString()); | 1886 touch_resize_window_->bounds().ToString()); |
| 1890 } | 1887 } |
| 1891 | 1888 |
| 1892 } // namespace ash | 1889 } // namespace ash |
| OLD | NEW |