| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/utility/screenshot_controller.h" | 5 #include "ash/utility/screenshot_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/cursor_window_controller.h" | 7 #include "ash/display/cursor_window_controller.h" |
| 8 #include "ash/display/mouse_cursor_event_filter.h" | 8 #include "ash/display/mouse_cursor_event_filter.h" |
| 9 #include "ash/display/window_tree_host_manager.h" | 9 #include "ash/display/window_tree_host_manager.h" |
| 10 #include "ash/screenshot_delegate.h" | 10 #include "ash/screenshot_delegate.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 GetEventGenerator().PressKey(ui::VKEY_A, 0); | 215 GetEventGenerator().PressKey(ui::VKEY_A, 0); |
| 216 GetEventGenerator().ReleaseKey(ui::VKEY_A, 0); | 216 GetEventGenerator().ReleaseKey(ui::VKEY_A, 0); |
| 217 | 217 |
| 218 EXPECT_FALSE(client->IsCursorVisible()); | 218 EXPECT_FALSE(client->IsCursorVisible()); |
| 219 | 219 |
| 220 StartPartialScreenshotSession(); | 220 StartPartialScreenshotSession(); |
| 221 EXPECT_TRUE(IsActive()); | 221 EXPECT_TRUE(IsActive()); |
| 222 EXPECT_TRUE(client->IsCursorVisible()); | 222 EXPECT_TRUE(client->IsCursorVisible()); |
| 223 | 223 |
| 224 // Platform's Cursor should be hidden while dragging. |
| 225 GetEventGenerator().PressLeftButton(); |
| 226 EXPECT_TRUE(IsActive()); |
| 227 EXPECT_FALSE(client->IsCursorVisible()); |
| 228 |
| 224 Cancel(); | 229 Cancel(); |
| 225 EXPECT_TRUE(client->IsCursorVisible()); | 230 EXPECT_TRUE(client->IsCursorVisible()); |
| 226 } | 231 } |
| 227 | 232 |
| 228 // Make sure ScreenshotController doesn't prevent handling of large | 233 // Make sure ScreenshotController doesn't prevent handling of large |
| 229 // cursor. See http://crbug.com/459214 | 234 // cursor. See http://crbug.com/459214 |
| 230 TEST_F(PartialScreenshotControllerTest, LargeCursor) { | 235 TEST_F(PartialScreenshotControllerTest, LargeCursor) { |
| 231 Shell::GetInstance()->cursor_manager()->SetCursorSet(ui::CURSOR_SET_LARGE); | 236 Shell::GetInstance()->cursor_manager()->SetCursorSet(ui::CURSOR_SET_LARGE); |
| 232 Shell::GetInstance() | 237 Shell::GetInstance() |
| 233 ->window_tree_host_manager() | 238 ->window_tree_host_manager() |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 EXPECT_FALSE(IsActive()); | 410 EXPECT_FALSE(IsActive()); |
| 406 | 411 |
| 407 StartWindowScreenshotSession(); | 412 StartWindowScreenshotSession(); |
| 408 EXPECT_TRUE(IsActive()); | 413 EXPECT_TRUE(IsActive()); |
| 409 UpdateDisplay("400x400"); | 414 UpdateDisplay("400x400"); |
| 410 RunAllPendingInMessageLoop(); | 415 RunAllPendingInMessageLoop(); |
| 411 EXPECT_FALSE(IsActive()); | 416 EXPECT_FALSE(IsActive()); |
| 412 } | 417 } |
| 413 | 418 |
| 414 } // namespace ash | 419 } // namespace ash |
| OLD | NEW |