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

Unified Diff: ash/display/screen_ash_unittest.cc

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 years, 4 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/screen_ash.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/screen_ash_unittest.cc
diff --git a/ash/display/screen_ash_unittest.cc b/ash/display/screen_ash_unittest.cc
index 44771b5fde0eb747f75f5681cd894e5460e9a604..4753780a93a4a282b5ee4382c74240dc1bd7fc5d 100644
--- a/ash/display/screen_ash_unittest.cc
+++ b/ash/display/screen_ash_unittest.cc
@@ -42,4 +42,16 @@ TEST_F(ScreenAshTest, TestGetWindowAtScreenPoint) {
gfx::Point(250, 260)));
}
+TEST_F(ScreenAshTest, TestSetDeviceScaleFactorForTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+ UpdateDisplay("800x500");
+ display::Screen* screen = display::Screen::GetScreen();
+ screen->SetDeviceScaleFactorForTest(2.0f);
+
+ EXPECT_EQ(gfx::Size(400, 250), screen->GetPrimaryDisplay().size());
+
+ display::Display::ResetForceDeviceScaleFactorForTesting();
+}
+
} // namespace ash
« no previous file with comments | « ash/display/screen_ash.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698