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

Unified Diff: ash/display/resolution_notification_controller_unittest.cc

Issue 417113012: Introduce user customization of external HighDPI mode for 4K monitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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
Index: ash/display/resolution_notification_controller_unittest.cc
diff --git a/ash/display/resolution_notification_controller_unittest.cc b/ash/display/resolution_notification_controller_unittest.cc
index e351c86ce7115aa4b2c2561f786f06a973d906de..995a8f5683b737f09b5cfb7c834eb0cb69014193 100644
--- a/ash/display/resolution_notification_controller_unittest.cc
+++ b/ash/display/resolution_notification_controller_unittest.cc
@@ -64,13 +64,23 @@ class ResolutionNotificationControllerTest : public ash::test::AshTestBase {
const gfx::Size& new_resolution,
const gfx::Size& actual_new_resolution) {
DisplayManager* display_manager = Shell::GetInstance()->display_manager();
+
const DisplayInfo& info = display_manager->GetDisplayInfo(display.id());
- controller()->SetDisplayResolutionAndNotify(
- display.id(),
- info.size_in_pixel(),
- new_resolution,
- base::Bind(&ResolutionNotificationControllerTest::OnAccepted,
- base::Unretained(this)));
+ DisplayMode old_mode(info.size_in_pixel(),
+ 60 /* refresh_rate */,
+ false /* interlaced */,
+ false /* native */);
+ DisplayMode new_mode = old_mode;
+ new_mode.size = new_resolution;
+
+ if (display_manager->SetDisplayMode(display.id(), new_mode)) {
+ controller()->PrepareNotification(
+ display.id(),
+ old_mode,
+ new_mode,
+ base::Bind(&ResolutionNotificationControllerTest::OnAccepted,
+ base::Unretained(this)));
+ }
// OnConfigurationChanged event won't be emitted in the test environment,
// so invoke UpdateDisplay() to emit that event explicitly.
« no previous file with comments | « ash/display/resolution_notification_controller.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698