| 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/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 311 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 312 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); | 312 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); |
| 313 | 313 |
| 314 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 314 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 315 EXPECT_TRUE(wm::IsActiveWindow(window1.get())); | 315 EXPECT_TRUE(wm::IsActiveWindow(window1.get())); |
| 316 | 316 |
| 317 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 317 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 318 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 318 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
| 319 } | 319 } |
| 320 | 320 |
| 321 #if defined(OS_WIN) | 321 TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) { |
| 322 // Multiple displays are not supported on Windows Ash. http://crbug.com/165962 | 322 if (!SupportsMultipleDisplays()) |
| 323 #define MAYBE_AlwaysOnTopMultipleRootWindows \ | 323 return; |
| 324 DISABLED_AlwaysOnTopMultipleRootWindows | |
| 325 #else | |
| 326 #define MAYBE_AlwaysOnTopMultipleRootWindows \ | |
| 327 AlwaysOnTopMultipleRootWindows | |
| 328 #endif | |
| 329 | 324 |
| 330 | |
| 331 TEST_F(WindowCycleControllerTest, MAYBE_AlwaysOnTopMultipleRootWindows) { | |
| 332 // Set up a second root window | 325 // Set up a second root window |
| 333 UpdateDisplay("1000x600,600x400"); | 326 UpdateDisplay("1000x600,600x400"); |
| 334 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 327 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
| 335 ASSERT_EQ(2U, root_windows.size()); | 328 ASSERT_EQ(2U, root_windows.size()); |
| 336 | 329 |
| 337 WindowCycleController* controller = | 330 WindowCycleController* controller = |
| 338 Shell::GetInstance()->window_cycle_controller(); | 331 Shell::GetInstance()->window_cycle_controller(); |
| 339 | 332 |
| 340 Shell::GetInstance()->set_active_root_window(root_windows[0]); | 333 Shell::GetInstance()->set_active_root_window(root_windows[0]); |
| 341 | 334 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 435 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 443 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); | 436 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); |
| 444 | 437 |
| 445 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 438 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 446 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 439 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
| 447 } | 440 } |
| 448 | 441 |
| 449 } // namespace | 442 } // namespace |
| 450 | 443 |
| 451 } // namespace ash | 444 } // namespace ash |
| OLD | NEW |