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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 // Test for Pinned mode. | 1454 // Test for Pinned mode. |
1455 TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) { | 1455 TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) { |
1456 WmShelf* shelf = GetPrimaryShelf(); | 1456 WmShelf* shelf = GetPrimaryShelf(); |
1457 | 1457 |
1458 aura::Window* window1 = CreateTestWindow(); | 1458 aura::Window* window1 = CreateTestWindow(); |
1459 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 1459 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
1460 window1->Show(); | 1460 window1->Show(); |
1461 | 1461 |
1462 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 1462 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
1463 | 1463 |
1464 wm::PinWindow(window1); | 1464 wm::PinWindow(window1, /* trusted */ false); |
1465 EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState()); | 1465 EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState()); |
1466 | 1466 |
1467 WmWindowAura::Get(window1)->GetWindowState()->Restore(); | 1467 WmWindowAura::Get(window1)->GetWindowState()->Restore(); |
1468 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 1468 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
1469 } | 1469 } |
1470 | 1470 |
1471 // Tests SHELF_ALIGNMENT_(LEFT, RIGHT). | 1471 // Tests SHELF_ALIGNMENT_(LEFT, RIGHT). |
1472 TEST_F(ShelfLayoutManagerTest, SetAlignment) { | 1472 TEST_F(ShelfLayoutManagerTest, SetAlignment) { |
1473 WmShelf* shelf = GetPrimaryShelf(); | 1473 WmShelf* shelf = GetPrimaryShelf(); |
1474 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); | 1474 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 // Open keyboard in sticky mode. | 2076 // Open keyboard in sticky mode. |
2077 kb_controller->ShowKeyboard(true); | 2077 kb_controller->ShowKeyboard(true); |
2078 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); | 2078 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); |
2079 | 2079 |
2080 // Work area should be changed. | 2080 // Work area should be changed. |
2081 EXPECT_NE(orig_work_area, | 2081 EXPECT_NE(orig_work_area, |
2082 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); | 2082 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); |
2083 } | 2083 } |
2084 | 2084 |
2085 } // namespace ash | 2085 } // namespace ash |
OLD | NEW |