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

Unified Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 2196923002: Make ash::DisplayMode more like ui::DisplayMode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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
Index: chrome/browser/chromeos/display/display_preferences_unittest.cc
diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc
index f2fa5355765c1ad880b92f816433ffecc2874fba..7f29b8f723ba4e6178ecf05483ec888c51d330f0 100644
--- a/chrome/browser/chromeos/display/display_preferences_unittest.cc
+++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc
@@ -378,8 +378,9 @@ TEST_F(DisplayPreferencesTest, BasicStores) {
EXPECT_FALSE(property->GetInteger("width", &width));
EXPECT_FALSE(property->GetInteger("height", &height));
- ash::DisplayMode mode(gfx::Size(300, 200), 60.0f, false, true);
- mode.device_scale_factor = 1.25f;
+ scoped_refptr<ash::DisplayMode> mode(new ash::DisplayMode(
+ gfx::Size(300, 200), 60.0f, false, true, 1.0 /* ui_scale */,
+ 1.25f /* device_scale_factor */));
display_manager->SetDisplayMode(id2, mode);
window_tree_host_manager->SetPrimaryDisplayId(id2);
@@ -527,10 +528,11 @@ TEST_F(DisplayPreferencesTest, PreventStore) {
// Set display's resolution in single display. It creates the notification and
// display preferences should not stored meanwhile.
ash::Shell* shell = ash::Shell::GetInstance();
- ash::DisplayMode old_mode;
- ash::DisplayMode new_mode;
- old_mode.size = gfx::Size(400, 300);
- new_mode.size = gfx::Size(500, 400);
+
+ scoped_refptr<ash::DisplayMode> old_mode(
+ new ash::DisplayMode(gfx::Size(400, 300)));
+ scoped_refptr<ash::DisplayMode> new_mode(
+ new ash::DisplayMode(gfx::Size(500, 400)));
if (shell->display_manager()->SetDisplayMode(id, new_mode)) {
shell->resolution_notification_controller()->PrepareNotification(
id, old_mode, new_mode, base::Closure());
@@ -556,7 +558,8 @@ TEST_F(DisplayPreferencesTest, PreventStore) {
// Once the notification is removed, the specified resolution will be stored
// by SetDisplayMode.
ash::Shell::GetInstance()->display_manager()->SetDisplayMode(
- id, ash::DisplayMode(gfx::Size(300, 200), 60.0f, false, true));
+ id, make_scoped_refptr(
+ new ash::DisplayMode(gfx::Size(300, 200), 60.0f, false, true)));
UpdateDisplay("300x200#500x400|400x300|300x200");
property = nullptr;

Powered by Google App Engine
This is Rietveld 408576698