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

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: review comments 2 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..9590500087a91df3ce104c9fb1fb739e70883823 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.SetPhysicalSize(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