| Index: ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
|
| diff --git a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
|
| index cf6bb66e3fb045e9b2b0105506574dd5b3937240..7ebe287b6ec88a3b94b5364763bbf294b71eaf98 100644
|
| --- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
|
| +++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
|
| @@ -13,6 +13,7 @@
|
| #include "ash/shell.h"
|
| #include "ash/system/tray/system_tray_delegate.h"
|
| #include "ash/test/ash_test_base.h"
|
| +#include "ash/test/display_configuration_controller_test_api.h"
|
| #include "ash/test/test_system_tray_delegate.h"
|
| #include "ash/wm/overview/window_selector_controller.h"
|
| #include "base/command_line.h"
|
| @@ -652,13 +653,18 @@ TEST_F(MaximizeModeControllerTest, RestoreAfterExit) {
|
| std::unique_ptr<aura::Window> w1(
|
| CreateTestWindowInShellWithBounds(gfx::Rect(10, 10, 900, 300)));
|
| maximize_mode_controller()->EnableMaximizeModeWindowManager(true);
|
| + display::Screen* screen = display::Screen::GetScreen();
|
| + test::DisplayConfigurationControllerTestApi display_config_controller_testapi(
|
| + Shell::Get()->display_configuration_controller());
|
| + display_config_controller_testapi.SetEnableScreenRotationAnimator(
|
| + screen->GetPrimaryDisplay().id(), false);
|
| Shell::Get()->screen_orientation_controller()->SetLockToRotation(
|
| display::Display::ROTATE_90);
|
| - display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay();
|
| + display::Display display = screen->GetPrimaryDisplay();
|
| EXPECT_EQ(display::Display::ROTATE_90, display.rotation());
|
| EXPECT_LT(display.size().width(), display.size().height());
|
| maximize_mode_controller()->EnableMaximizeModeWindowManager(false);
|
| - display = display::Screen::GetScreen()->GetPrimaryDisplay();
|
| + display = screen->GetPrimaryDisplay();
|
| // Sanity checks.
|
| EXPECT_EQ(display::Display::ROTATE_0, display.rotation());
|
| EXPECT_GT(display.size().width(), display.size().height());
|
| @@ -666,6 +672,8 @@ TEST_F(MaximizeModeControllerTest, RestoreAfterExit) {
|
| // The bounds should be restored to the original bounds, and
|
| // should not be clamped by the portrait display in touch view.
|
| EXPECT_EQ(gfx::Rect(10, 10, 900, 300), w1->bounds());
|
| + display_config_controller_testapi.SetEnableScreenRotationAnimator(
|
| + screen->GetPrimaryDisplay().id(), true);
|
| }
|
|
|
| } // namespace ash
|
|
|