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

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

Issue 2761063002: Move 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
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 TEST_F(WindowCycleControllerTest, SingleWindowNotActive) { 145 TEST_F(WindowCycleControllerTest, SingleWindowNotActive) {
146 WindowCycleController* controller = WmShell::Get()->window_cycle_controller(); 146 WindowCycleController* controller = WmShell::Get()->window_cycle_controller();
147 147
148 // Create a single test window. 148 // Create a single test window.
149 std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0)); 149 std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
150 wm::ActivateWindow(window0.get()); 150 wm::ActivateWindow(window0.get());
151 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); 151 EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
152 152
153 // Rotate focus, this should move focus to another window that isn't part of 153 // Rotate focus, this should move focus to another window that isn't part of
154 // the default container. 154 // the default container.
155 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); 155 Shell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD);
156 EXPECT_FALSE(wm::IsActiveWindow(window0.get())); 156 EXPECT_FALSE(wm::IsActiveWindow(window0.get()));
157 157
158 // Cycling should activate the window. 158 // Cycling should activate the window.
159 controller->HandleCycleWindow(WindowCycleController::FORWARD); 159 controller->HandleCycleWindow(WindowCycleController::FORWARD);
160 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); 160 EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
161 } 161 }
162 162
163 TEST_F(WindowCycleControllerTest, HandleCycleWindow) { 163 TEST_F(WindowCycleControllerTest, HandleCycleWindow) {
164 WindowCycleController* controller = WmShell::Get()->window_cycle_controller(); 164 WindowCycleController* controller = WmShell::Get()->window_cycle_controller();
165 165
(...skipping 597 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/virtual_keyboard_controller.cc ('k') | chrome/browser/chromeos/login/ui/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698