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

Unified Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 2194353002: mash: Migrate ScopedTargetRootWindow to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: non-virtual Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/window_positioner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_cycle_controller_unittest.cc
diff --git a/ash/wm/window_cycle_controller_unittest.cc b/ash/wm/window_cycle_controller_unittest.cc
index 21f02e37d20cfee4b5545a1d570c28d8446c7416..ad61331fc9d2040e3e076c45d4054fcd25f5f6c4 100644
--- a/ash/wm/window_cycle_controller_unittest.cc
+++ b/ash/wm/window_cycle_controller_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/focus_cycler.h"
+#include "ash/common/scoped_root_window_for_new_windows.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/window_cycle_list.h"
@@ -377,8 +378,6 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
WindowCycleController* controller = WmShell::Get()->window_cycle_controller();
- Shell::GetInstance()->set_target_root_window(root_windows[0]);
-
// Create two windows in the primary root.
std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
EXPECT_EQ(root_windows[0], window0->GetRootWindow());
@@ -387,8 +386,9 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
std::unique_ptr<Window> window1(CreateTestWindowWithId(1, top_container0));
EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- // And two on the secondary root.
- Shell::GetInstance()->set_target_root_window(root_windows[1]);
+ // Move the active root window to the secondary root and create two windows.
+ ScopedRootWindowForNewWindows root_for_new_windows(
+ WmWindowAura::Get(root_windows[1]));
std::unique_ptr<Window> window2(CreateTestWindowInShellWithId(2));
EXPECT_EQ(root_windows[1], window2->GetRootWindow());
@@ -397,9 +397,6 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
std::unique_ptr<Window> window3(CreateTestWindowWithId(3, top_container1));
EXPECT_EQ(root_windows[1], window3->GetRootWindow());
- // Move the active root window to the secondary.
- Shell::GetInstance()->set_target_root_window(root_windows[1]);
-
wm::ActivateWindow(window2.get());
EXPECT_EQ(root_windows[0], window0->GetRootWindow());
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698