Index: ash/shelf/shelf_layout_manager_unittest.cc |
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc |
index 088221e19d20c65258de292b20ff3863ecfe1ecd..61074796b89579ad40cbf58108cd0959ae28f8f8 100644 |
--- a/ash/shelf/shelf_layout_manager_unittest.cc |
+++ b/ash/shelf/shelf_layout_manager_unittest.cc |
@@ -7,6 +7,7 @@ |
#include "ash/accelerators/accelerator_controller.h" |
#include "ash/accelerators/accelerator_table.h" |
#include "ash/ash_switches.h" |
+#include "ash/aura/wm_window_aura.h" |
#include "ash/common/session/session_state_delegate.h" |
#include "ash/common/shelf/shelf_constants.h" |
#include "ash/common/shell_window_ids.h" |
@@ -1659,6 +1660,22 @@ TEST_F(ShelfLayoutManagerTest, FullscreenWindowOnSecondDisplay) { |
root_window_controllers[1]->GetShelfLayoutManager()->visibility_state()); |
} |
+// Test for Pinned mode. |
+TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) { |
+ Shelf* shelf = GetShelf(); |
+ |
+ aura::Window* window1 = CreateTestWindow(); |
+ window1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
+ window1->Show(); |
+ |
+ EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
+ |
+ wm::PinWindow(window1); |
+ EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState()); |
+ |
+ WmWindowAura::Get(window1)->GetWindowState()->Restore(); |
+ EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
+} |
#if defined(OS_WIN) |
// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962 |