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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 408353002: Add virtual resolutions for 1.25 DSF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager_unittest.cc
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
index 7db5ba9108e1d031edde3d1f9025e5af869a769b..54dd0aa578f32c5a6139ae1feb6c6fb1612d9b57 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -953,6 +953,16 @@ TEST_F(DisplayManagerTest, UIScale) {
display = Shell::GetScreen()->GetPrimaryDisplay();
EXPECT_EQ(1.0f, display.device_scale_factor());
EXPECT_EQ("1280x850", display.bounds().size().ToString());
+
+ // 1.25 ui scaling on 1.25 DSF device should use 1.0 DSF
+ // on screen.
+ UpdateDisplay("1280x850*1.25");
+ display_manager()->SetDisplayUIScale(display_id, 1.25f);
+ EXPECT_EQ(1.25f, GetDisplayInfoAt(0).configured_ui_scale());
+ EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveUIScale());
+ display = Shell::GetScreen()->GetPrimaryDisplay();
+ EXPECT_EQ(1.0f, display.device_scale_factor());
+ EXPECT_EQ("1280x850", display.bounds().size().ToString());
}
TEST_F(DisplayManagerTest, UIScaleUpgradeToHighDPI) {
« no previous file with comments | « ash/display/display_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698