| Index: chrome/browser/extensions/display_info_provider_chromeos_unittest.cc
|
| diff --git a/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc b/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc
|
| index 757a1c92c139a6efb415aa73e12e8b52bffed1be..a73993b63a7c718694910923568d03ac2a58722f 100644
|
| --- a/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc
|
| +++ b/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc
|
| @@ -1150,7 +1150,7 @@ TEST_F(DisplayInfoProviderChromeosTest, DisplayMode) {
|
| // Get the currently active mode and one other mode to switch to.
|
| int64_t id;
|
| base::StringToInt64(primary_info.id, &id);
|
| - ash::DisplayMode active_mode =
|
| + scoped_refptr<ash::DisplayMode> active_mode =
|
| GetDisplayManager()->GetActiveModeForDisplayId(id);
|
| const api::system_display::DisplayMode* cur_mode = nullptr;
|
| const api::system_display::DisplayMode* other_mode = nullptr;
|
| @@ -1167,12 +1167,13 @@ TEST_F(DisplayInfoProviderChromeosTest, DisplayMode) {
|
| ASSERT_NE(other_mode, cur_mode);
|
|
|
| // Verify that other_mode differs from the active mode.
|
| - ash::DisplayMode other_mode_ash;
|
| - other_mode_ash.size.SetSize(other_mode->width_in_native_pixels,
|
| - other_mode->height_in_native_pixels);
|
| - other_mode_ash.ui_scale = other_mode->ui_scale;
|
| - other_mode_ash.device_scale_factor = other_mode->device_scale_factor;
|
| - EXPECT_FALSE(active_mode.IsEquivalent(other_mode_ash));
|
| + scoped_refptr<ash::DisplayMode> other_mode_ash(new ash::DisplayMode(
|
| + gfx::Size(other_mode->width_in_native_pixels,
|
| + other_mode->height_in_native_pixels),
|
| + active_mode->refresh_rate(), active_mode->is_interlaced(),
|
| + active_mode->native(), other_mode->ui_scale,
|
| + other_mode->device_scale_factor));
|
| + EXPECT_FALSE(active_mode->IsEquivalent(other_mode_ash));
|
|
|
| // Switch modes.
|
| api::system_display::DisplayProperties info;
|
| @@ -1186,7 +1187,7 @@ TEST_F(DisplayInfoProviderChromeosTest, DisplayMode) {
|
|
|
| // Verify that other_mode now matches the active mode.
|
| active_mode = GetDisplayManager()->GetActiveModeForDisplayId(id);
|
| - EXPECT_TRUE(active_mode.IsEquivalent(other_mode_ash));
|
| + EXPECT_TRUE(active_mode->IsEquivalent(other_mode_ash));
|
| }
|
|
|
| } // namespace
|
|
|