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

Unified Diff: ash/magnifier/magnification_controller_unittest.cc

Issue 2886843004: Fix jittering cursor in screen magnifier mode (Closed)
Patch Set: Fix unstable cursor in dual-display magnified mode Created 3 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/magnifier/magnification_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/magnifier/magnification_controller_unittest.cc
diff --git a/ash/magnifier/magnification_controller_unittest.cc b/ash/magnifier/magnification_controller_unittest.cc
index 30485569d234b56a9c42c2b2b619c0f90ac8fa72..e6e564fcaedafa5aac56a5333e6c4474a217a197 100644
--- a/ash/magnifier/magnification_controller_unittest.cc
+++ b/ash/magnifier/magnification_controller_unittest.cc
@@ -700,4 +700,28 @@ TEST_F(MagnificationControllerTest, EnableMagnifierInUnifiedDesktop) {
EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
}
+// Make sure that mouse can move across display in magnified mode.
+TEST_F(MagnificationControllerTest, MoveMouseToSecondDisplay) {
+ UpdateDisplay("0+0-500x500, 500+0-500x500");
+ EXPECT_EQ(2ul, display::Screen::GetScreen()->GetAllDisplays().size());
+
+ aura::Window::Windows root_windows = Shell::GetAllRootWindows();
+
+ GetEventGenerator().MoveMouseTo(gfx::Point(250, 250));
+ EXPECT_TRUE(root_windows[1]->layer()->transform().IsIdentity());
+ EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity());
+
+ GetMagnificationController()->SetEnabled(true);
+ EXPECT_FALSE(root_windows[0]->layer()->transform().IsIdentity());
+ EXPECT_TRUE(root_windows[1]->layer()->transform().IsIdentity());
+
+ GetEventGenerator().MoveMouseTo(gfx::Point(750, 250));
+ EXPECT_FALSE(root_windows[1]->layer()->transform().IsIdentity());
+ EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity());
+
+ GetMagnificationController()->SetEnabled(false);
+ EXPECT_TRUE(root_windows[1]->layer()->transform().IsIdentity());
+ EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity());
+}
+
} // namespace ash
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698