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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 579053002: Remove "upgrading to 2x DSF for lower UI scale when 2x resoruces are available" option (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 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') | ash/wm/ash_native_cursor_manager_unittest.cc » ('j') | 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 fcd42ba4c00bf2f73d7d38438f386d3617e3e6e6..6080ed6e23b93578f3e946f235584753cd9b21da 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -1065,45 +1065,6 @@ TEST_F(DisplayManagerTest, UIScaleWithDisplayMode) {
display_manager()->GetActiveModeForDisplayId(display_id)));
}
-TEST_F(DisplayManagerTest, UIScaleUpgradeToHighDPI) {
- int64 display_id = Shell::GetScreen()->GetPrimaryDisplay().id();
- gfx::Display::SetInternalDisplayId(display_id);
- UpdateDisplay("1920x1080");
-
- DisplayInfo::SetAllowUpgradeToHighDPI(false);
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- EXPECT_EQ("2160x1215", GetDisplayForId(display_id).size().ToString());
-
- display_manager()->SetDisplayUIScale(display_id, 0.5f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
- EXPECT_EQ(0.5f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- EXPECT_EQ("960x540", GetDisplayForId(display_id).size().ToString());
-
- DisplayInfo::SetAllowUpgradeToHighDPI(true);
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- EXPECT_EQ("2160x1215", GetDisplayForId(display_id).size().ToString());
-
- display_manager()->SetDisplayUIScale(display_id, 0.5f);
- EXPECT_EQ(2.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- EXPECT_EQ("960x540", GetDisplayForId(display_id).size().ToString());
-
- // Upgrade only works on 1.0f DSF.
- UpdateDisplay("1920x1080*2");
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(2.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- EXPECT_EQ("1080x607", GetDisplayForId(display_id).size().ToString());
-
- display_manager()->SetDisplayUIScale(display_id, 0.5f);
- EXPECT_EQ(2.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
- EXPECT_EQ(0.5f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- EXPECT_EQ("480x270", GetDisplayForId(display_id).size().ToString());
-}
TEST_F(DisplayManagerTest, Use125DSFRorUIScaling) {
int64 display_id = Shell::GetScreen()->GetPrimaryDisplay().id();
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/wm/ash_native_cursor_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698