| Index: ash/content/display/screen_orientation_controller_chromeos_unittest.cc
|
| diff --git a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
|
| index 53bfcdb81518b980e3a3590fbdc9995a9585a835..6851fa6bcf3eaa07473f59be4d04b8f705765789 100644
|
| --- a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
|
| +++ b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
|
| @@ -422,7 +422,8 @@ TEST_F(ScreenOrientationControllerTest, BlockRotationNotifications) {
|
| EnableMaximizeMode(true);
|
| test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
|
| tray_delegate->set_should_show_display_notification(true);
|
| - test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();
|
| + test::DisplayManagerTestApi(display_manager())
|
| + .SetFirstDisplayAsInternalDisplay();
|
|
|
| message_center::MessageCenter* message_center =
|
| message_center::MessageCenter::Get();
|
| @@ -474,7 +475,8 @@ TEST_F(ScreenOrientationControllerTest, BlockRotationNotifications) {
|
| // Tests that if a user has set a display rotation that it is restored upon
|
| // exiting maximize mode.
|
| TEST_F(ScreenOrientationControllerTest, ResetUserRotationUponExit) {
|
| - test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();
|
| + test::DisplayManagerTestApi(display_manager())
|
| + .SetFirstDisplayAsInternalDisplay();
|
|
|
| SetInternalDisplayRotation(display::Display::ROTATE_90);
|
| EnableMaximizeMode(true);
|
| @@ -600,7 +602,8 @@ TEST_F(ScreenOrientationControllerTest, UserRotationLockDisallowsRotation) {
|
| // ready, that ScreenOrientationController still begins listening to events,
|
| // which require an internal display to be acted upon.
|
| TEST_F(ScreenOrientationControllerTest, InternalDisplayNotAvailableAtStartup) {
|
| - test::DisplayManagerTestApi().SetFirstDisplayAsInternalDisplay();
|
| + test::DisplayManagerTestApi(display_manager())
|
| + .SetFirstDisplayAsInternalDisplay();
|
|
|
| int64_t internal_display_id = display::Display::InternalDisplayId();
|
| display::Display::SetInternalDisplayId(display::Display::kInvalidDisplayID);
|
| @@ -643,22 +646,22 @@ TEST_F(ScreenOrientationControllerTest, RotateInactiveDisplay) {
|
| // The display::ManagedDisplayInfo list with two active displays needs to be
|
| // added first so that the DisplayManager can track the
|
| // |internal_display_info| as inactive instead of non-existent.
|
| - DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| - display_manager->UpdateDisplaysWith(display_info_list_two_active);
|
| - display_manager->UpdateDisplaysWith(display_info_list_one_active);
|
| + display_manager()->UpdateDisplaysWith(display_info_list_two_active);
|
| + display_manager()->UpdateDisplaysWith(display_info_list_one_active);
|
|
|
| - test::ScopedSetInternalDisplayId set_internal(kInternalDisplayId);
|
| + test::ScopedSetInternalDisplayId set_internal(display_manager(),
|
| + kInternalDisplayId);
|
|
|
| - ASSERT_NE(
|
| - kNewRotation,
|
| - display_manager->GetDisplayInfo(kInternalDisplayId).GetActiveRotation());
|
| + ASSERT_NE(kNewRotation, display_manager()
|
| + ->GetDisplayInfo(kInternalDisplayId)
|
| + .GetActiveRotation());
|
|
|
| Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation(
|
| kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE);
|
|
|
| - EXPECT_EQ(
|
| - kNewRotation,
|
| - display_manager->GetDisplayInfo(kInternalDisplayId).GetActiveRotation());
|
| + EXPECT_EQ(kNewRotation, display_manager()
|
| + ->GetDisplayInfo(kInternalDisplayId)
|
| + .GetActiveRotation());
|
| }
|
|
|
| } // namespace ash
|
|
|