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/aura/wm_shelf_aura.h" | 7 #include "ash/aura/wm_shelf_aura.h" |
8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
10 #include "ash/common/accelerators/accelerator_table.h" | 10 #include "ash/common/accelerators/accelerator_table.h" |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 // Test for Pinned mode. | 1462 // Test for Pinned mode. |
1463 TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) { | 1463 TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) { |
1464 WmShelf* shelf = GetPrimaryShelf(); | 1464 WmShelf* shelf = GetPrimaryShelf(); |
1465 | 1465 |
1466 aura::Window* window1 = CreateTestWindow(); | 1466 aura::Window* window1 = CreateTestWindow(); |
1467 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 1467 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
1468 window1->Show(); | 1468 window1->Show(); |
1469 | 1469 |
1470 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 1470 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
1471 | 1471 |
1472 wm::PinWindow(window1); | 1472 wm::PinWindow(window1, /* trusted */ false); |
1473 EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState()); | 1473 EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState()); |
1474 | 1474 |
1475 WmWindowAura::Get(window1)->GetWindowState()->Restore(); | 1475 WmWindowAura::Get(window1)->GetWindowState()->Restore(); |
1476 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 1476 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
1477 } | 1477 } |
1478 | 1478 |
1479 // Tests SHELF_ALIGNMENT_(LEFT, RIGHT). | 1479 // Tests SHELF_ALIGNMENT_(LEFT, RIGHT). |
1480 TEST_F(ShelfLayoutManagerTest, SetAlignment) { | 1480 TEST_F(ShelfLayoutManagerTest, SetAlignment) { |
1481 WmShelf* shelf = GetPrimaryShelf(); | 1481 WmShelf* shelf = GetPrimaryShelf(); |
1482 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); | 1482 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2084 // Open keyboard in sticky mode. | 2084 // Open keyboard in sticky mode. |
2085 kb_controller->ShowKeyboard(true); | 2085 kb_controller->ShowKeyboard(true); |
2086 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); | 2086 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); |
2087 | 2087 |
2088 // Work area should be changed. | 2088 // Work area should be changed. |
2089 EXPECT_NE(orig_work_area, | 2089 EXPECT_NE(orig_work_area, |
2090 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); | 2090 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); |
2091 } | 2091 } |
2092 | 2092 |
2093 } // namespace ash | 2093 } // namespace ash |
OLD | NEW |