| 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 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 ScreenshotControllerTest() {} | 27 ScreenshotControllerTest() {} |
| 28 ~ScreenshotControllerTest() override {} | 28 ~ScreenshotControllerTest() override {} |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 ScreenshotController* screenshot_controller() { | 31 ScreenshotController* screenshot_controller() { |
| 32 return Shell::GetInstance()->screenshot_controller(); | 32 return Shell::GetInstance()->screenshot_controller(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 bool TestIfMouseWarpsAt(const gfx::Point& point_in_screen) { | 35 bool TestIfMouseWarpsAt(const gfx::Point& point_in_screen) { |
| 36 return test::DisplayManagerTestApi::TestIfMouseWarpsAt(GetEventGenerator(), | 36 return test::AshTestBase::TestIfMouseWarpsAt(GetEventGenerator(), |
| 37 point_in_screen); | 37 point_in_screen); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void StartPartialScreenshotSession() { | 40 void StartPartialScreenshotSession() { |
| 41 screenshot_controller()->StartPartialScreenshotSession( | 41 screenshot_controller()->StartPartialScreenshotSession( |
| 42 GetScreenshotDelegate(), true); | 42 GetScreenshotDelegate(), true); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void StartWindowScreenshotSession() { | 45 void StartWindowScreenshotSession() { |
| 46 screenshot_controller()->StartWindowScreenshotSession( | 46 screenshot_controller()->StartWindowScreenshotSession( |
| 47 GetScreenshotDelegate()); | 47 GetScreenshotDelegate()); |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 EXPECT_FALSE(IsActive()); | 475 EXPECT_FALSE(IsActive()); |
| 476 | 476 |
| 477 StartWindowScreenshotSession(); | 477 StartWindowScreenshotSession(); |
| 478 EXPECT_TRUE(IsActive()); | 478 EXPECT_TRUE(IsActive()); |
| 479 UpdateDisplay("400x400"); | 479 UpdateDisplay("400x400"); |
| 480 RunAllPendingInMessageLoop(); | 480 RunAllPendingInMessageLoop(); |
| 481 EXPECT_FALSE(IsActive()); | 481 EXPECT_FALSE(IsActive()); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace ash | 484 } // namespace ash |
| OLD | NEW |