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

Unified Diff: ash/display/display_controller_unittest.cc

Issue 17704003: Create RootWindowTransformer after root window's bounds and scale factor are updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/display/display_controller.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698