| OLD | NEW |
| 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/wm/window_cycle_controller.h" | 5 #include "ash/wm/window_cycle_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/focus_cycler.h" | 10 #include "ash/focus_cycler.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 | 402 |
| 403 // Create two windows in the primary root. | 403 // Create two windows in the primary root. |
| 404 std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0)); | 404 std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0)); |
| 405 EXPECT_EQ(root_windows[0], window0->GetRootWindow()); | 405 EXPECT_EQ(root_windows[0], window0->GetRootWindow()); |
| 406 Window* top_container0 = | 406 Window* top_container0 = |
| 407 Shell::GetContainer(root_windows[0], kShellWindowId_AlwaysOnTopContainer); | 407 Shell::GetContainer(root_windows[0], kShellWindowId_AlwaysOnTopContainer); |
| 408 std::unique_ptr<Window> window1(CreateTestWindowWithId(1, top_container0)); | 408 std::unique_ptr<Window> window1(CreateTestWindowWithId(1, top_container0)); |
| 409 EXPECT_EQ(root_windows[0], window1->GetRootWindow()); | 409 EXPECT_EQ(root_windows[0], window1->GetRootWindow()); |
| 410 | 410 |
| 411 // Move the active root window to the secondary root and create two windows. | 411 // Move the active root window to the secondary root and create two windows. |
| 412 ScopedRootWindowForNewWindows root_for_new_windows( | 412 ScopedRootWindowForNewWindows root_for_new_windows(root_windows[1]); |
| 413 WmWindow::Get(root_windows[1])); | |
| 414 std::unique_ptr<Window> window2(CreateTestWindowInShellWithId(2)); | 413 std::unique_ptr<Window> window2(CreateTestWindowInShellWithId(2)); |
| 415 EXPECT_EQ(root_windows[1], window2->GetRootWindow()); | 414 EXPECT_EQ(root_windows[1], window2->GetRootWindow()); |
| 416 | 415 |
| 417 Window* top_container1 = | 416 Window* top_container1 = |
| 418 Shell::GetContainer(root_windows[1], kShellWindowId_AlwaysOnTopContainer); | 417 Shell::GetContainer(root_windows[1], kShellWindowId_AlwaysOnTopContainer); |
| 419 std::unique_ptr<Window> window3(CreateTestWindowWithId(3, top_container1)); | 418 std::unique_ptr<Window> window3(CreateTestWindowWithId(3, top_container1)); |
| 420 EXPECT_EQ(root_windows[1], window3->GetRootWindow()); | 419 EXPECT_EQ(root_windows[1], window3->GetRootWindow()); |
| 421 | 420 |
| 422 wm::ActivateWindow(window2.get()); | 421 wm::ActivateWindow(window2.get()); |
| 423 | 422 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 // Base case sets the expectation for other cases. | 760 // Base case sets the expectation for other cases. |
| 762 if (expected_bounds.IsEmpty()) | 761 if (expected_bounds.IsEmpty()) |
| 763 expected_bounds = display_relative_bounds; | 762 expected_bounds = display_relative_bounds; |
| 764 else | 763 else |
| 765 EXPECT_EQ(expected_bounds, display_relative_bounds); | 764 EXPECT_EQ(expected_bounds, display_relative_bounds); |
| 766 controller->CompleteCycling(); | 765 controller->CompleteCycling(); |
| 767 } | 766 } |
| 768 } | 767 } |
| 769 | 768 |
| 770 } // namespace ash | 769 } // namespace ash |
| OLD | NEW |