| Index: ash/test/ash_test_base.cc
|
| diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
|
| index 80c92a6f5fff20fbbf4d0880888529ebdc189082..1676d36733019f1f4b292e5d2a6378442f035d74 100644
|
| --- a/ash/test/ash_test_base.cc
|
| +++ b/ash/test/ash_test_base.cc
|
| @@ -8,6 +8,7 @@
|
| #include <vector>
|
|
|
| #include "ash/display/display_controller.h"
|
| +#include "ash/display/multi_display_manager.h"
|
| #include "ash/shell.h"
|
| #include "ash/test/test_shell_delegate.h"
|
| #include "base/run_loop.h"
|
| @@ -58,7 +59,10 @@ void AshTestBase::SetUp() {
|
| TestShellDelegate* delegate = new TestShellDelegate;
|
| ash::Shell::CreateInstance(delegate);
|
| Shell::GetPrimaryRootWindow()->Show();
|
| - Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(800, 600));
|
| + // Move the mouse cursor to far away so that native events doesn't
|
| + // interfere test expectations.
|
| + Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000));
|
| + UpdateDisplay("800x600");
|
| Shell::GetInstance()->cursor_manager()->ShowCursor(true);
|
|
|
| // Disable animations during tests.
|
| @@ -87,8 +91,11 @@ void AshTestBase::ChangeDisplayConfig(float scale,
|
|
|
| void AshTestBase::UpdateDisplay(const std::string& display_specs) {
|
| std::vector<gfx::Display> displays = CreateDisplaysFromString(display_specs);
|
| - aura::Env::GetInstance()->display_manager()->
|
| - OnNativeDisplaysChanged(displays);
|
| + internal::MultiDisplayManager* display_manager =
|
| + static_cast<internal::MultiDisplayManager*>(
|
| + aura::Env::GetInstance()->display_manager());
|
| + display_manager->SetDisplayIdsForTest(&displays);
|
| + display_manager->OnNativeDisplaysChanged(displays);
|
|
|
| // On non-testing environment, when a secondary display is connected, a new
|
| // native (i.e. X) window for the display is always created below the previous
|
|
|