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

Unified Diff: ui/base/layout_unittest.cc

Issue 327503003: Added 250p scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « ui/base/layout.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/layout_unittest.cc
diff --git a/ui/base/layout_unittest.cc b/ui/base/layout_unittest.cc
index 310cd09bcc6b42a002151890cb276831ea192b1b..070247079ef33d43628d9a3405dee597e429a1a8 100644
--- a/ui/base/layout_unittest.cc
+++ b/ui/base/layout_unittest.cc
@@ -21,6 +21,7 @@ TEST(LayoutTest, GetScaleFactorScale) {
EXPECT_FLOAT_EQ(1.5f, GetScaleForScaleFactor(SCALE_FACTOR_150P));
EXPECT_FLOAT_EQ(1.8f, GetScaleForScaleFactor(SCALE_FACTOR_180P));
EXPECT_FLOAT_EQ(2.0f, GetScaleForScaleFactor(SCALE_FACTOR_200P));
+ EXPECT_FLOAT_EQ(2.5f, GetScaleForScaleFactor(SCALE_FACTOR_250P));
EXPECT_FLOAT_EQ(3.0f, GetScaleForScaleFactor(SCALE_FACTOR_300P));
}
@@ -61,6 +62,10 @@ TEST(LayoutTest, GetScaleFactorFromScaleAllSupported) {
EXPECT_EQ(SCALE_FACTOR_200P, GetSupportedScaleFactor(1.91f));
EXPECT_EQ(SCALE_FACTOR_200P, GetSupportedScaleFactor(2.0f));
EXPECT_EQ(SCALE_FACTOR_200P, GetSupportedScaleFactor(2.1f));
+ EXPECT_EQ(SCALE_FACTOR_250P, GetSupportedScaleFactor(2.3f));
+ EXPECT_EQ(SCALE_FACTOR_250P, GetSupportedScaleFactor(2.5f));
+ EXPECT_EQ(SCALE_FACTOR_250P, GetSupportedScaleFactor(2.6f));
+ EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(2.9f));
EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(3.0f));
EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(3.1f));
EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(999.0f));
« no previous file with comments | « ui/base/layout.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698