Index: ash/wm/toplevel_layout_manager_unittest.cc |
diff --git a/ash/wm/toplevel_layout_manager_unittest.cc b/ash/wm/toplevel_layout_manager_unittest.cc |
index 31297348c995c5d07aa224143f8ca81e16fadef5..9d40e93ddaead1e87c3d630ecbb9d9f7831dde69 100644 |
--- a/ash/wm/toplevel_layout_manager_unittest.cc |
+++ b/ash/wm/toplevel_layout_manager_unittest.cc |
@@ -33,7 +33,7 @@ class ToplevelLayoutManagerTest : public test::AshTestBase { |
virtual void SetUp() OVERRIDE { |
test::AshTestBase::SetUp(); |
- Shell::GetRootWindow()->screen()->set_work_area_insets( |
+ Shell::GetRootWindow()->SetScreenWorkAreaInsets( |
gfx::Insets(1, 2, 3, 4)); |
Shell::GetRootWindow()->SetHostSize(gfx::Size(800, 600)); |
aura::Window* default_container = Shell::GetInstance()->GetContainer( |
@@ -100,6 +100,26 @@ TEST_F(ToplevelLayoutManagerTest, Fullscreen) { |
EXPECT_EQ(bounds, window->bounds()); |
} |
+// Tests maximized window resizing on work area insets change. |
+TEST_F(ToplevelLayoutManagerTest, ResizeMaximizedWindowOnWorkAreaInsetsChange) |
+{ |
sky
2012/03/01 01:43:19
{ on previous line, or wrap if > 80.
jennyz
2012/03/01 18:27:45
Done.
|
+ gfx::Rect bounds(100, 100, 200, 200); |
+ scoped_ptr<aura::Window> window(CreateTestWindow(bounds)); |
+ Shell::GetRootWindow()->SetScreenWorkAreaInsets( |
+ gfx::Insets(0, 0, 30, 0)); |
+ window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
+ // Maximized window fills the work area. |
+ EXPECT_EQ(gfx::Screen::GetMonitorWorkAreaNearestWindow(window.get()), |
+ window->bounds()); |
+ |
+ // Change work area insets. |
+ Shell::GetRootWindow()->SetScreenWorkAreaInsets( |
+ gfx::Insets(0, 0, 60, 0)); |
+ // Maximized window fills the changed work area. |
+ EXPECT_EQ(gfx::Screen::GetMonitorWorkAreaNearestWindow(window.get()), |
+ window->bounds()); |
+} |
+ |
// Tests fullscreen window size during root window resize. |
TEST_F(ToplevelLayoutManagerTest, FullscreenRootWindowResize) { |
gfx::Rect bounds(100, 100, 200, 200); |