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

Unified Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 years, 1 month 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/wm/window_animations_unittest.cc ('k') | ash/wm/window_manager_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 fefb0de7b435eb0b0da6cb4f7d4e9e17dc5ba0ae..c3b1ce61a02e87b538f2edc4a80907b3afdce4cf 100644
--- a/ash/wm/window_cycle_controller_unittest.cc
+++ b/ash/wm/window_cycle_controller_unittest.cc
@@ -41,7 +41,7 @@ TEST_F(WindowCycleControllerTest, HandleCycleWindowBaseCases) {
controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -57,7 +57,7 @@ TEST_F(WindowCycleControllerTest, SingleWindowNotActive) {
Shell::GetInstance()->window_cycle_controller();
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -77,9 +77,9 @@ TEST_F(WindowCycleControllerTest, HandleCycleWindow) {
// Set up several windows to use to test cycling. Create them in reverse
// order so they are stacked 0 over 1 over 2.
- scoped_ptr<Window> window2(CreateTestWindowWithId(2, NULL));
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, NULL));
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
+ scoped_ptr<Window> window2(CreateTestWindowInShellWithId(2));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
// Simulate pressing and releasing Alt-tab.
@@ -184,8 +184,8 @@ TEST_F(WindowCycleControllerTest, HandleCycleWindow) {
// Cycles between a maximized and normal window.
TEST_F(WindowCycleControllerTest, MaximizedWindow) {
// Create a couple of test windows.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
wm::MaximizeWindow(window1.get());
wm::ActivateWindow(window1.get());
@@ -205,8 +205,8 @@ TEST_F(WindowCycleControllerTest, MaximizedWindow) {
// Cycles to a minimized window.
TEST_F(WindowCycleControllerTest, Minimized) {
// Create a couple of test windows.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
wm::MinimizeWindow(window1.get());
wm::ActivateWindow(window0.get());
@@ -229,8 +229,8 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopWindow) {
Shell::GetInstance()->window_cycle_controller();
// Set up several windows to use to test cycling.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
Window* top_container =
Shell::GetContainer(
@@ -273,8 +273,8 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultiWindow) {
Shell::GetInstance()->window_cycle_controller();
// Set up several windows to use to test cycling.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
Window* top_container =
Shell::GetContainer(
@@ -329,7 +329,7 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
Shell::GetInstance()->set_active_root_window(root_windows[0]);
// Create two windows in the primary root.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
EXPECT_EQ(root_windows[0], window0->GetRootWindow());
Window* top_container0 =
Shell::GetContainer(
@@ -340,7 +340,7 @@ TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
// And two on the secondary root.
Shell::GetInstance()->set_active_root_window(root_windows[1]);
- scoped_ptr<Window> window2(CreateTestWindowWithId(2, NULL));
+ scoped_ptr<Window> window2(CreateTestWindowInShellWithId(2));
EXPECT_EQ(root_windows[1], window2->GetRootWindow());
Window* top_container1 =
@@ -398,9 +398,9 @@ TEST_F(WindowCycleControllerTest, MostRecentlyUsed) {
Shell::GetInstance()->window_cycle_controller();
// Set up several windows to use to test cycling.
- scoped_ptr<Window> window0(CreateTestWindowWithId(0, NULL));
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, NULL));
- scoped_ptr<Window> window2(CreateTestWindowWithId(2, NULL));
+ scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
+ scoped_ptr<Window> window2(CreateTestWindowInShellWithId(2));
wm::ActivateWindow(window0.get());
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ash/wm/window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698