Chromium Code Reviews| Index: chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc |
| diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc |
| index db3850dd5560d4454265dd764bef43f691ac9a4b..1cdff01f2745db0a4877c8cf4a0e8921994b6f02 100644 |
| --- a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc |
| +++ b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc |
| @@ -2,10 +2,12 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include "ash/common/scoped_root_window_for_new_windows.h" |
| #include "ash/common/wm/window_positioner.h" |
| #include "ash/common/wm/window_resizer.h" |
| #include "ash/common/wm/window_state.h" |
| -#include "ash/scoped_target_root_window.h" |
| +#include "ash/common/wm_shell.h" |
| +#include "ash/common/wm_window.h" |
| #include "ash/screen_util.h" |
| #include "ash/shell.h" |
| #include "ash/test/ash_test_base.h" |
| @@ -561,9 +563,6 @@ TEST_F(WindowSizerAshTest, MAYBE_PlaceNewWindowsOnMultipleDisplays) { |
| display::Screen::GetScreen()->GetPrimaryDisplay().bounds(); |
| gfx::Rect secondary_bounds = ash::ScreenUtil::GetSecondaryDisplay().bounds(); |
| - ash::Shell::GetInstance()->set_target_root_window( |
| - ash::Shell::GetPrimaryRootWindow()); |
| - |
| std::unique_ptr<TestingProfile> profile(new TestingProfile()); |
| // Create browser windows that are used as reference. |
| @@ -822,9 +821,8 @@ TEST_F(WindowSizerAshTest, DefaultBoundsInTargetDisplay) { |
| return; |
| UpdateDisplay("500x500,600x600"); |
| { |
| - aura::Window* first_root = |
| - ash::Shell::GetAllRootWindows()[0]; |
| - ash::ScopedTargetRootWindow tmp(first_root); |
| + ash::WmWindow* first_root = ash::WmShell::Get()->GetAllRootWindows()[0]; |
|
msw
2016/08/02 01:04:51
optional nit: ScopedRootWindowForNewWindows for fi
James Cook
2016/08/02 16:16:04
Done.
|
| + ash::ScopedRootWindowForNewWindows tmp(first_root); |
| gfx::Rect bounds; |
| ui::WindowShowState show_state; |
| WindowSizer::GetBrowserWindowBoundsAndShowState( |
| @@ -836,9 +834,8 @@ TEST_F(WindowSizerAshTest, DefaultBoundsInTargetDisplay) { |
| EXPECT_TRUE(first_root->GetBoundsInScreen().Contains(bounds)); |
| } |
| { |
| - aura::Window* second_root = |
| - ash::Shell::GetAllRootWindows()[1]; |
| - ash::ScopedTargetRootWindow tmp(second_root); |
| + ash::WmWindow* second_root = ash::WmShell::Get()->GetAllRootWindows()[1]; |
| + ash::ScopedRootWindowForNewWindows tmp(second_root); |
| gfx::Rect bounds; |
| ui::WindowShowState show_state; |
| WindowSizer::GetBrowserWindowBoundsAndShowState( |