| 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 RETURN_IF_WIN8; |
| 323 #define MAYBE_AlwaysOnTopMultipleRootWindows \ | |
| 324 DISABLED_AlwaysOnTopMultipleRootWindows | |
| 325 #else | |
| 326 #define MAYBE_AlwaysOnTopMultipleRootWindows \ | |
| 327 AlwaysOnTopMultipleRootWindows | |
| 328 #endif | |
| 329 | 323 |
| 330 | |
| 331 TEST_F(WindowCycleControllerTest, MAYBE_AlwaysOnTopMultipleRootWindows) { | |
| 332 // Set up a second root window | 324 // Set up a second root window |
| 333 UpdateDisplay("1000x600,600x400"); | 325 UpdateDisplay("1000x600,600x400"); |
| 334 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 326 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
| 335 ASSERT_EQ(2U, root_windows.size()); | 327 ASSERT_EQ(2U, root_windows.size()); |
| 336 | 328 |
| 337 WindowCycleController* controller = | 329 WindowCycleController* controller = |
| 338 Shell::GetInstance()->window_cycle_controller(); | 330 Shell::GetInstance()->window_cycle_controller(); |
| 339 | 331 |
| 340 Shell::GetInstance()->set_active_root_window(root_windows[0]); | 332 Shell::GetInstance()->set_active_root_window(root_windows[0]); |
| 341 | 333 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 434 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 443 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); | 435 EXPECT_TRUE(wm::IsActiveWindow(window2.get())); |
| 444 | 436 |
| 445 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); | 437 controller->HandleCycleWindow(WindowCycleController::FORWARD, true); |
| 446 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); | 438 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); |
| 447 } | 439 } |
| 448 | 440 |
| 449 } // namespace | 441 } // namespace |
| 450 | 442 |
| 451 } // namespace ash | 443 } // namespace ash |
| OLD | NEW |