Index: ash/display/display_controller_unittest.cc |
diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc |
index 06168daf010a66b9b88dbe808d82dbe5244e5f63..374c025f34621bc327afdfd9be308ff995bdf1d7 100644 |
--- a/ash/display/display_controller_unittest.cc |
+++ b/ash/display/display_controller_unittest.cc |
@@ -753,6 +753,20 @@ TEST_F(DisplayControllerTest, OverscanInsets) { |
generator.MoveMouseToInHost(30, 20); |
EXPECT_EQ("30,20", event_handler.GetLocationAndReset()); |
+ |
+ // Make sure the root window transformer uses correct scale |
+ // factor when swapping display. Test crbug.com/253690. |
+ UpdateDisplay("400x300*2,600x400/o"); |
+ root_windows = Shell::GetAllRootWindows(); |
+ gfx::Point point; |
+ Shell::GetAllRootWindows()[1]->GetRootTransform().TransformPoint(point); |
+ EXPECT_EQ("15,10", point.ToString()); |
+ |
+ display_controller->SwapPrimaryDisplay(); |
+ point.SetPoint(0, 0); |
+ Shell::GetAllRootWindows()[1]->GetRootTransform().TransformPoint(point); |
+ EXPECT_EQ("15,10", point.ToString()); |
+ |
Shell::GetInstance()->RemovePreTargetHandler(&event_handler); |
} |