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

Unified Diff: ash/wm/window_positioner_unittest.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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
« no previous file with comments | « ash/wm/window_positioner.cc ('k') | ash/wm/window_positioning_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_positioner_unittest.cc
diff --git a/ash/wm/window_positioner_unittest.cc b/ash/wm/window_positioner_unittest.cc
index 2ecdf04bf82d816ce7d00d5d6d9e0c020d233083..28950cd7a5bee16c431f0762a3abd3095fc3a708 100644
--- a/ash/wm/window_positioner_unittest.cc
+++ b/ash/wm/window_positioner_unittest.cc
@@ -30,7 +30,7 @@ TEST_F(WindowPositionerTest, OpenMaximizedWindowOnSecondDisplay) {
// a new window gets maximized.
UpdateDisplay("400x400,500x500");
ScopedRootWindowForNewWindows root_for_new_windows(
- ShellPort::Get()->GetAllRootWindows()[1]);
+ Shell::GetAllRootWindows()[1]);
shell::ToplevelWindow::CreateParams params;
params.can_resize = true;
params.can_maximize = true;
@@ -41,7 +41,7 @@ TEST_F(WindowPositionerTest, OpenMaximizedWindowOnSecondDisplay) {
TEST_F(WindowPositionerTest, OpenDefaultWindowOnSecondDisplay) {
UpdateDisplay("400x400,1400x900");
- WmWindow* second_root_window = ShellPort::Get()->GetAllRootWindows()[1];
+ aura::Window* second_root_window = Shell::GetAllRootWindows()[1];
ScopedRootWindowForNewWindows root_for_new_windows(second_root_window);
shell::ToplevelWindow::CreateParams params;
params.can_resize = true;
@@ -51,8 +51,10 @@ TEST_F(WindowPositionerTest, OpenDefaultWindowOnSecondDisplay) {
// The window should be in the 2nd display with the default size.
EXPECT_EQ("300x300", bounds.size().ToString());
- EXPECT_TRUE(
- second_root_window->GetDisplayNearestWindow().bounds().Contains(bounds));
+ EXPECT_TRUE(display::Screen::GetScreen()
+ ->GetDisplayNearestWindow(second_root_window)
+ .bounds()
+ .Contains(bounds));
}
// Tests that second window inherits first window's maximized state as well as
« no previous file with comments | « ash/wm/window_positioner.cc ('k') | ash/wm/window_positioning_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698