Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 2761373002: Move yet more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/power_button_controller.cc ('k') | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/wm/power_button_controller.cc ('k') | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698