diff options
Diffstat (limited to 'ash/wm/base_layout_manager_unittest.cc')
-rw-r--r-- | ash/wm/base_layout_manager_unittest.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ash/wm/base_layout_manager_unittest.cc b/ash/wm/base_layout_manager_unittest.cc index 2de08af..5d48392 100644 --- a/ash/wm/base_layout_manager_unittest.cc +++ b/ash/wm/base_layout_manager_unittest.cc @@ -54,8 +54,9 @@ TEST_F(BaseLayoutManagerTest, Maximize) { scoped_ptr<aura::Window> window(CreateTestWindow(bounds)); window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); // Maximized window fills the work area, not the whole display. - EXPECT_EQ(ScreenAsh::GetMaximizedWindowBounds(window.get()).ToString(), - window->bounds().ToString()); + EXPECT_EQ( + ScreenAsh::GetMaximizedWindowParentBounds(window.get()).ToString(), + window->bounds().ToString()); window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); EXPECT_EQ(bounds.ToString(), window->bounds().ToString()); } @@ -78,14 +79,15 @@ TEST_F(BaseLayoutManagerTest, MaximizeRootWindowResize) { scoped_ptr<aura::Window> window(CreateTestWindow(bounds)); window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); gfx::Rect initial_work_area_bounds = - ScreenAsh::GetMaximizedWindowBounds(window.get()); + ScreenAsh::GetMaximizedWindowParentBounds(window.get()); EXPECT_EQ(initial_work_area_bounds.ToString(), window->bounds().ToString()); // Enlarge the root window. We should still match the work area size. Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(900, 700)); - EXPECT_EQ(ScreenAsh::GetMaximizedWindowBounds(window.get()).ToString(), - window->bounds().ToString()); + EXPECT_EQ( + ScreenAsh::GetMaximizedWindowParentBounds(window.get()).ToString(), + window->bounds().ToString()); EXPECT_NE(initial_work_area_bounds.ToString(), - ScreenAsh::GetMaximizedWindowBounds(window.get()).ToString()); + ScreenAsh::GetMaximizedWindowParentBounds(window.get()).ToString()); } // Tests normal->fullscreen->normal. @@ -166,7 +168,8 @@ TEST_F(BaseLayoutManagerTest, BoundsWithScreenEdgeVisible) { window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); // It should have the default maximized window bounds, inset by the grid size. int grid_size = ash::Shell::GetInstance()->GetGridSize(); - gfx::Rect max_bounds = ash::ScreenAsh::GetMaximizedWindowBounds(window.get()); + gfx::Rect max_bounds = + ash::ScreenAsh::GetMaximizedWindowParentBounds(window.get()); max_bounds.Inset(grid_size, grid_size); EXPECT_EQ(max_bounds.ToString(), window->bounds().ToString()); } |