Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2318)

Unified Diff: ash/utility/partial_screenshot_controller_unittest.cc

Issue 1128933009: Show the cursor if it was hidden when starting partical screenshot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/utility/partial_screenshot_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ash/utility/partial_screenshot_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698