| 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/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/accelerators/accelerator_table.h" | 8 #include "ash/accelerators/accelerator_table.h" |
| 9 #include "ash/focus_cycler.h" | 9 #include "ash/focus_cycler.h" |
| 10 #include "ash/public/cpp/config.h" | 10 #include "ash/public/cpp/config.h" |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); | 925 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); |
| 926 EXPECT_EQ(display.bounds().bottom() - kShelfAutoHideSize, | 926 EXPECT_EQ(display.bounds().bottom() - kShelfAutoHideSize, |
| 927 GetShelfWidget()->GetWindowBoundsInScreen().y()); | 927 GetShelfWidget()->GetWindowBoundsInScreen().y()); |
| 928 | 928 |
| 929 std::unique_ptr<views::Widget> lock_widget(AshTestBase::CreateTestWidget( | 929 std::unique_ptr<views::Widget> lock_widget(AshTestBase::CreateTestWidget( |
| 930 nullptr, kShellWindowId_LockScreenContainer, gfx::Rect(200, 200))); | 930 nullptr, kShellWindowId_LockScreenContainer, gfx::Rect(200, 200))); |
| 931 lock_widget->Maximize(); | 931 lock_widget->Maximize(); |
| 932 | 932 |
| 933 // Lock the screen. | 933 // Lock the screen. |
| 934 LockScreen(); | 934 LockScreen(); |
| 935 // Showing a widget in the lock screen should force the shelf to be visibile. | 935 // Showing a widget in the lock screen should force the shelf to be visible. |
| 936 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 936 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
| 937 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); | 937 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); |
| 938 | 938 |
| 939 UnlockScreen(); | 939 UnlockScreen(); |
| 940 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | 940 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); |
| 941 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); | 941 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); |
| 942 } | 942 } |
| 943 | 943 |
| 944 // Assertions around SetAutoHideBehavior. | 944 // Assertions around SetAutoHideBehavior. |
| 945 TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) { | 945 TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) { |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 // Open keyboard in sticky mode. | 1894 // Open keyboard in sticky mode. |
| 1895 kb_controller->ShowKeyboard(true); | 1895 kb_controller->ShowKeyboard(true); |
| 1896 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); | 1896 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); |
| 1897 | 1897 |
| 1898 // Work area should be changed. | 1898 // Work area should be changed. |
| 1899 EXPECT_NE(orig_work_area, | 1899 EXPECT_NE(orig_work_area, |
| 1900 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); | 1900 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); |
| 1901 } | 1901 } |
| 1902 | 1902 |
| 1903 } // namespace ash | 1903 } // namespace ash |
| OLD | NEW |