Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3363)

Unified Diff: chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc

Issue 2194353002: mash: Migrate ScopedTargetRootWindow to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reflow comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ash/shell.cc ('K') | « ash/wm/window_positioner_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« ash/shell.cc ('K') | « ash/wm/window_positioner_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698