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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 EXPECT_TRUE(IsActive()); | 289 EXPECT_TRUE(IsActive()); |
290 EXPECT_FALSE(client->IsCursorVisible()); | 290 EXPECT_FALSE(client->IsCursorVisible()); |
291 | 291 |
292 Cancel(); | 292 Cancel(); |
293 EXPECT_TRUE(client->IsCursorVisible()); | 293 EXPECT_TRUE(client->IsCursorVisible()); |
294 } | 294 } |
295 | 295 |
296 // Make sure ScreenshotController doesn't prevent handling of large | 296 // Make sure ScreenshotController doesn't prevent handling of large |
297 // cursor. See http://crbug.com/459214 | 297 // cursor. See http://crbug.com/459214 |
298 TEST_F(PartialScreenshotControllerTest, LargeCursor) { | 298 TEST_F(PartialScreenshotControllerTest, LargeCursor) { |
299 Shell::Get()->cursor_manager()->SetCursorSet(ui::CURSOR_SET_LARGE); | 299 Shell::Get()->cursor_manager()->SetCursorSize(ui::CursorSize::kLarge); |
300 Shell::Get() | 300 Shell::Get() |
301 ->window_tree_host_manager() | 301 ->window_tree_host_manager() |
302 ->cursor_window_controller() | 302 ->cursor_window_controller() |
303 ->SetCursorCompositingEnabled(true); | 303 ->SetCursorCompositingEnabled(true); |
304 | 304 |
305 // Large cursor is represented as cursor window. | 305 // Large cursor is represented as cursor window. |
306 test::MirrorWindowTestApi test_api; | 306 test::MirrorWindowTestApi test_api; |
307 ASSERT_NE(nullptr, test_api.GetCursorWindow()); | 307 ASSERT_NE(nullptr, test_api.GetCursorWindow()); |
308 | 308 |
309 ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow()); | 309 ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow()); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 CreateSelectableWindow(gfx::Rect(100, 100, 100, 100))); | 476 CreateSelectableWindow(gfx::Rect(100, 100, 100, 100))); |
477 window->SetCapture(); | 477 window->SetCapture(); |
478 EXPECT_TRUE(window->HasCapture()); | 478 EXPECT_TRUE(window->HasCapture()); |
479 StartWindowScreenshotSession(); | 479 StartWindowScreenshotSession(); |
480 EXPECT_TRUE(window->HasCapture()); | 480 EXPECT_TRUE(window->HasCapture()); |
481 Cancel(); | 481 Cancel(); |
482 EXPECT_FALSE(window->HasCapture()); | 482 EXPECT_FALSE(window->HasCapture()); |
483 } | 483 } |
484 | 484 |
485 } // namespace ash | 485 } // namespace ash |
OLD | NEW |