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

Unified Diff: ash/utility/screenshot_controller_unittest.cc

Issue 2393703002: Fix partial screenshot/window screenshot when holding Alt+Tab. (Closed)
Patch Set: update test Created 4 years, 2 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/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/screenshot_controller_unittest.cc
diff --git a/ash/utility/screenshot_controller_unittest.cc b/ash/utility/screenshot_controller_unittest.cc
index 88dbffd0089ff8cdb53138b085703160624bba3b..4031dba03bb40d0b7ce4fde5f24f765118165e26 100644
--- a/ash/utility/screenshot_controller_unittest.cc
+++ b/ash/utility/screenshot_controller_unittest.cc
@@ -481,4 +481,17 @@ TEST_F(ScreenshotControllerTest, MultipleDisplays) {
EXPECT_FALSE(IsActive());
}
+// Windows that take capture can misbehave due to a screenshot session. Break
+// mouse capture when the screenshot session is over. See crbug.com/651939
+TEST_F(ScreenshotControllerTest, BreaksCapture) {
+ std::unique_ptr<aura::Window> window(
+ CreateSelectableWindow(gfx::Rect(100, 100, 100, 100)));
+ window->SetCapture();
+ EXPECT_TRUE(window->HasCapture());
+ StartWindowScreenshotSession();
+ EXPECT_TRUE(window->HasCapture());
+ Cancel();
+ EXPECT_FALSE(window->HasCapture());
+}
+
} // namespace ash
« no previous file with comments | « ash/utility/screenshot_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698