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/wm/window_cycle_controller.h" | 5 #include "ash/wm/window_cycle_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/session_state_delegate.h" | 9 #include "ash/session_state_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 319 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
320 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 320 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
321 } | 321 } |
322 | 322 |
323 TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) { | 323 TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) { |
324 if (!SupportsMultipleDisplays()) | 324 if (!SupportsMultipleDisplays()) |
325 return; | 325 return; |
326 | 326 |
327 // Set up a second root window | 327 // Set up a second root window |
328 UpdateDisplay("1000x600,600x400"); | 328 UpdateDisplay("1000x600,600x400"); |
329 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 329 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
330 ASSERT_EQ(2U, root_windows.size()); | 330 ASSERT_EQ(2U, root_windows.size()); |
331 | 331 |
332 WindowCycleController* controller = | 332 WindowCycleController* controller = |
333 Shell::GetInstance()->window_cycle_controller(); | 333 Shell::GetInstance()->window_cycle_controller(); |
334 | 334 |
335 Shell::GetInstance()->set_target_root_window(root_windows[0]); | 335 Shell::GetInstance()->set_target_root_window(root_windows[0]); |
336 | 336 |
337 // Create two windows in the primary root. | 337 // Create two windows in the primary root. |
338 scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0)); | 338 scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0)); |
339 EXPECT_EQ(root_windows[0], window0->GetRootWindow()); | 339 EXPECT_EQ(root_windows[0], window0->GetRootWindow()); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 437 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
438 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); | 438 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); |
439 | 439 |
440 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 440 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
441 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 441 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
442 } | 442 } |
443 | 443 |
444 } // namespace | 444 } // namespace |
445 | 445 |
446 } // namespace ash | 446 } // namespace ash |
OLD | NEW |