OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/wm/window_cycle_controller.h" | 5 #include "ash/common/wm/window_cycle_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/common/focus_cycler.h" | 10 #include "ash/common/focus_cycler.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 controller->HandleCycleWindow(WindowCycleController::BACKWARD); | 220 controller->HandleCycleWindow(WindowCycleController::BACKWARD); |
221 controller->CompleteCycling(); | 221 controller->CompleteCycling(); |
222 EXPECT_TRUE(wm::IsActiveWindow(window1.get())); | 222 EXPECT_TRUE(wm::IsActiveWindow(window1.get())); |
223 | 223 |
224 // Reset our stacking order. | 224 // Reset our stacking order. |
225 wm::ActivateWindow(window2.get()); | 225 wm::ActivateWindow(window2.get()); |
226 wm::ActivateWindow(window1.get()); | 226 wm::ActivateWindow(window1.get()); |
227 wm::ActivateWindow(window0.get()); | 227 wm::ActivateWindow(window0.get()); |
228 | 228 |
229 // When the screen is locked, cycling window does not take effect. | 229 // When the screen is locked, cycling window does not take effect. |
230 WmShell::Get()->session_controller()->LockScreenAndFlushForTest(); | 230 Shell::Get()->session_controller()->LockScreenAndFlushForTest(); |
231 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 231 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
232 controller->HandleCycleWindow(WindowCycleController::FORWARD); | 232 controller->HandleCycleWindow(WindowCycleController::FORWARD); |
233 EXPECT_FALSE(controller->IsCycling()); | 233 EXPECT_FALSE(controller->IsCycling()); |
234 | 234 |
235 // Unlock, it works again. | 235 // Unlock, it works again. |
236 GetSessionControllerClient()->UnlockScreen(); | 236 GetSessionControllerClient()->UnlockScreen(); |
237 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 237 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
238 controller->HandleCycleWindow(WindowCycleController::FORWARD); | 238 controller->HandleCycleWindow(WindowCycleController::FORWARD); |
239 controller->HandleCycleWindow(WindowCycleController::FORWARD); | 239 controller->HandleCycleWindow(WindowCycleController::FORWARD); |
240 controller->CompleteCycling(); | 240 controller->CompleteCycling(); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 // Base case sets the expectation for other cases. | 763 // Base case sets the expectation for other cases. |
764 if (expected_bounds.IsEmpty()) | 764 if (expected_bounds.IsEmpty()) |
765 expected_bounds = display_relative_bounds; | 765 expected_bounds = display_relative_bounds; |
766 else | 766 else |
767 EXPECT_EQ(expected_bounds, display_relative_bounds); | 767 EXPECT_EQ(expected_bounds, display_relative_bounds); |
768 controller->CompleteCycling(); | 768 controller->CompleteCycling(); |
769 } | 769 } |
770 } | 770 } |
771 | 771 |
772 } // namespace ash | 772 } // namespace ash |
OLD | NEW |