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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 1251573006: Cleanup: Enable 125DSFForUIScaling on by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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') | ash/test/display_manager_test_api.h » ('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 56a67662b5e49143d3a6b11c224ebfcf7ec5a8c9..e20469e46e38064c655c09bdf9f4cdf7cfb46075 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -942,7 +942,7 @@ TEST_F(DisplayManagerTest, Rotate) {
}
TEST_F(DisplayManagerTest, UIScale) {
- DisplayInfo::SetUse125DSFForUIScaling(false);
+ test::ScopedDisable125DSFForUIScaling disable;
UpdateDisplay("1280x800");
int64 display_id = Shell::GetScreen()->GetPrimaryDisplay().id();
@@ -1113,9 +1113,7 @@ TEST_F(DisplayManagerTest, UIScaleWithDisplayMode) {
display_manager()->GetActiveModeForDisplayId(display_id)));
}
-TEST_F(DisplayManagerTest, Use125DSFRorUIScaling) {
- DisplayInfo::SetUse125DSFForUIScaling(true);
-
+TEST_F(DisplayManagerTest, Use125DSFForUIScaling) {
int64 display_id = Shell::GetScreen()->GetPrimaryDisplay().id();
test::DisplayManagerTestApi(display_manager())
.SetInternalDisplayId(display_id);
@@ -1138,8 +1136,6 @@ TEST_F(DisplayManagerTest, Use125DSFRorUIScaling) {
EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveDeviceScaleFactor());
EXPECT_EQ(1.25f, GetDisplayInfoAt(0).GetEffectiveUIScale());
EXPECT_EQ("2400x1350", GetDisplayForId(display_id).size().ToString());
-
- DisplayInfo::SetUse125DSFForUIScaling(false);
}
TEST_F(DisplayManagerTest, UIScaleInUnifiedMode) {
@@ -1727,6 +1723,7 @@ TEST_F(DisplayManagerFontTest, TextSubpixelPositioningWithDsf100Internal) {
}
TEST_F(DisplayManagerFontTest, TextSubpixelPositioningWithDsf125Internal) {
+ test::ScopedDisable125DSFForUIScaling disable;
FontTestHelper helper(1.25f, FontTestHelper::INTERNAL);
ASSERT_DOUBLE_EQ(
1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor());
@@ -1776,7 +1773,6 @@ TEST_F(DisplayManagerFontTest, TextSubpixelPositioningWithDsf200External) {
TEST_F(DisplayManagerFontTest,
TextSubpixelPositioningWithDsf125InternalWithScaling) {
- DisplayInfo::SetUse125DSFForUIScaling(true);
FontTestHelper helper(1.25f, FontTestHelper::INTERNAL);
ASSERT_DOUBLE_EQ(
1.0f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor());
@@ -1790,8 +1786,6 @@ TEST_F(DisplayManagerFontTest,
1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor());
EXPECT_TRUE(IsTextSubpixelPositioningEnabled());
EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams());
-
- DisplayInfo::SetUse125DSFForUIScaling(false);
}
TEST_F(DisplayManagerTest, CheckInitializationOfRotationProperty) {
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/test/display_manager_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698