| Index: ash/test/ash_test_helper.cc
|
| diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
|
| index 5bc6bd0051bb0d94e2600623d1c2c670cf187430..b9101ca9b474ef85a08fac64cf69ccd0fc556379 100644
|
| --- a/ash/test/ash_test_helper.cc
|
| +++ b/ash/test/ash_test_helper.cc
|
| @@ -23,7 +23,6 @@
|
| #include "ash/test/test_session_state_delegate.h"
|
| #include "ash/test/test_shell_delegate.h"
|
| #include "ash/test/test_system_tray_delegate.h"
|
| -#include "ash/wm_window.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/run_loop.h"
|
| #include "base/strings/string_split.h"
|
| @@ -47,9 +46,11 @@
|
| #include "ui/base/test/material_design_controller_test_api.h"
|
| #include "ui/compositor/scoped_animation_duration_scale_mode.h"
|
| #include "ui/compositor/test/context_factories_for_test.h"
|
| +#include "ui/display/display.h"
|
| #include "ui/display/display_switches.h"
|
| #include "ui/display/manager/display_manager.h"
|
| #include "ui/display/manager/managed_display_info.h"
|
| +#include "ui/display/screen.h"
|
| #include "ui/display/test/display_manager_test_api.h"
|
| #include "ui/message_center/message_center.h"
|
| #include "ui/wm/core/capture_controller.h"
|
| @@ -62,10 +63,14 @@ namespace ash {
|
| namespace test {
|
| namespace {
|
|
|
| +const display::Display GetDisplayNearestWindow(aura::Window* window) {
|
| + return display::Screen::GetScreen()->GetDisplayNearestWindow(window);
|
| +}
|
| +
|
| bool CompareByDisplayId(RootWindowController* root1,
|
| RootWindowController* root2) {
|
| - return root1->GetWindow()->GetDisplayNearestWindow().id() <
|
| - root2->GetWindow()->GetDisplayNearestWindow().id();
|
| + return GetDisplayNearestWindow(root1->GetRootWindow()).id() <
|
| + GetDisplayNearestWindow(root2->GetRootWindow()).id();
|
| }
|
|
|
| } // namespace
|
| @@ -319,7 +324,7 @@ display::Display AshTestHelper::GetSecondaryDisplay() {
|
| std::vector<RootWindowController*> roots = GetRootsOrderedByDisplayId();
|
| CHECK_LE(2U, roots.size());
|
| return roots.size() < 2 ? display::Display()
|
| - : roots[1]->GetWindow()->GetDisplayNearestWindow();
|
| + : GetDisplayNearestWindow(roots[1]->GetRootWindow());
|
| }
|
|
|
| void AshTestHelper::CreateMashWindowManager() {
|
| @@ -403,7 +408,7 @@ void AshTestHelper::UpdateDisplay(RootWindowController* root_window_controller,
|
| bounds.set_x(*next_x);
|
| *next_x += bounds.size().width();
|
| display::Display updated_display =
|
| - root_window_controller->GetWindow()->GetDisplayNearestWindow();
|
| + GetDisplayNearestWindow(root_window_controller->GetRootWindow());
|
| gfx::Insets work_area_insets = updated_display.GetWorkAreaInsets();
|
| updated_display.set_bounds(bounds);
|
| updated_display.UpdateWorkAreaFromInsets(work_area_insets);
|
|
|