| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/shelf/shelf_layout_manager.h" | 5 #include "ash/common/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/common/accelerators/accelerator_controller.h" | 7 #include "ash/common/accelerators/accelerator_controller.h" |
| 8 #include "ash/common/accelerators/accelerator_table.h" | 8 #include "ash/common/accelerators/accelerator_table.h" |
| 9 #include "ash/common/focus_cycler.h" | 9 #include "ash/common/focus_cycler.h" |
| 10 #include "ash/common/session/session_controller.h" | 10 #include "ash/common/session/session_controller.h" |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 | 1494 |
| 1495 // Create a visible window so auto-hide behavior is enforced. | 1495 // Create a visible window so auto-hide behavior is enforced. |
| 1496 CreateTestWidget(); | 1496 CreateTestWidget(); |
| 1497 | 1497 |
| 1498 // Turn on auto-hide for the shelf. | 1498 // Turn on auto-hide for the shelf. |
| 1499 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 1499 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
| 1500 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | 1500 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); |
| 1501 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState()); | 1501 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState()); |
| 1502 | 1502 |
| 1503 // Show the status menu. That should make the shelf visible again. | 1503 // Show the status menu. That should make the shelf visible again. |
| 1504 WmShell::Get()->accelerator_controller()->PerformActionIfEnabled( | 1504 Shell::Get()->accelerator_controller()->PerformActionIfEnabled( |
| 1505 SHOW_SYSTEM_TRAY_BUBBLE); | 1505 SHOW_SYSTEM_TRAY_BUBBLE); |
| 1506 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | 1506 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); |
| 1507 EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState()); | 1507 EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState()); |
| 1508 EXPECT_TRUE(GetPrimarySystemTray()->HasSystemBubble()); | 1508 EXPECT_TRUE(GetPrimarySystemTray()->HasSystemBubble()); |
| 1509 } | 1509 } |
| 1510 | 1510 |
| 1511 TEST_F(ShelfLayoutManagerTest, WorkAreaChangeWorkspace) { | 1511 TEST_F(ShelfLayoutManagerTest, WorkAreaChangeWorkspace) { |
| 1512 // Make sure the shelf is always visible. | 1512 // Make sure the shelf is always visible. |
| 1513 WmShelf* shelf = GetPrimaryShelf(); | 1513 WmShelf* shelf = GetPrimaryShelf(); |
| 1514 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); | 1514 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 // Open keyboard in sticky mode. | 1811 // Open keyboard in sticky mode. |
| 1812 kb_controller->ShowKeyboard(true); | 1812 kb_controller->ShowKeyboard(true); |
| 1813 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); | 1813 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); |
| 1814 | 1814 |
| 1815 // Work area should be changed. | 1815 // Work area should be changed. |
| 1816 EXPECT_NE(orig_work_area, | 1816 EXPECT_NE(orig_work_area, |
| 1817 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); | 1817 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); |
| 1818 } | 1818 } |
| 1819 | 1819 |
| 1820 } // namespace ash | 1820 } // namespace ash |
| OLD | NEW |