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

Unified Diff: ui/gfx/display_unittest.cc

Issue 1563183008: Added capability on Windows to get the physical dimensions of your attached monitors. Also added th… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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
Index: ui/gfx/display_unittest.cc
diff --git a/ui/gfx/display_unittest.cc b/ui/gfx/display_unittest.cc
index f87b93e9546d4662ead97dd898b262edc4a82e1c..6e9151b8bbd77e5beab27c103ae3296f4870fe01 100644
--- a/ui/gfx/display_unittest.cc
+++ b/ui/gfx/display_unittest.cc
@@ -62,6 +62,16 @@ TEST(DisplayTest, ForcedDeviceScaleFactorByCommandLine) {
Display::ResetForceDeviceScaleFactorForTesting();
}
+TEST(DisplayTest, PhysicalSize) {
+ Display display;
+ EXPECT_FALSE(display.IsPhysicalSizeAvailable());
+ display.SetPhysicalSizeMm(gfx::Size(420, 69));
+ EXPECT_TRUE(display.IsPhysicalSizeAvailable());
+ gfx::Size size = display.GetPhysicalSizeMm();
+ EXPECT_EQ(420, size.width());
+ EXPECT_EQ(69, size.height());
+}
+
} // namespace
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698