Index: ash/utility/partial_screenshot_controller_unittest.cc |
diff --git a/ash/utility/partial_screenshot_controller_unittest.cc b/ash/utility/partial_screenshot_controller_unittest.cc |
index 4233723c3d077912b3d1ca30daeb1d140ff0e273..2caa9e80f02cbbc7b5eef95d6312f6ea8011f1b3 100644 |
--- a/ash/utility/partial_screenshot_controller_unittest.cc |
+++ b/ash/utility/partial_screenshot_controller_unittest.cc |
@@ -33,6 +33,8 @@ class PartialScreenshotControllerTest : public test::AshTestBase { |
GetScreenshotDelegate()); |
} |
+ void Cancel() { partial_screenshot_controller()->Cancel(); } |
+ |
bool IsActive() { |
return partial_screenshot_controller()->screenshot_delegate_ != nullptr; |
} |
@@ -141,6 +143,22 @@ TEST_F(PartialScreenshotControllerTest, MultipleDisplays) { |
} |
#if defined(OS_CHROMEOS) |
+TEST_F(PartialScreenshotControllerTest, VisibilityTest) { |
+ aura::client::CursorClient* client = Shell::GetInstance()->cursor_manager(); |
+ |
+ GetEventGenerator().PressKey(ui::VKEY_A, 0); |
+ GetEventGenerator().ReleaseKey(ui::VKEY_A, 0); |
+ |
+ EXPECT_FALSE(client->IsCursorVisible()); |
+ |
+ StartPartialScreenshotSession(); |
+ EXPECT_TRUE(IsActive()); |
+ EXPECT_TRUE(client->IsCursorVisible()); |
+ |
+ Cancel(); |
+ EXPECT_TRUE(client->IsCursorVisible()); |
+} |
+ |
// Make sure PartialScreenshotController doesn't prevent handling of large |
// cursor. See http://crbug.com/459214 |
TEST_F(PartialScreenshotControllerTest, LargeCursor) { |