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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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
« no previous file with comments | « ash/wm/window_animations.cc ('k') | ash/wm/window_cycle_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « ash/wm/window_animations.cc ('k') | ash/wm/window_cycle_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698