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

Unified Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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 7cb4bbc11efb438c3a41437168ae5c1132eb300a..ef1f1e52aa2e649024209bd5ceacc05afaea6239 100644
--- a/ash/wm/window_cycle_controller_unittest.cc
+++ b/ash/wm/window_cycle_controller_unittest.cc
@@ -12,6 +12,7 @@
#include "ash/test/ash_test_base.h"
#include "ash/test/test_shell_delegate.h"
#include "ash/wm/window_cycle_list.h"
+#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "base/memory/scoped_ptr.h"
#include "ui/aura/client/aura_constants.h"
@@ -185,20 +186,20 @@ TEST_F(WindowCycleControllerTest, MaximizedWindow) {
// Create a couple of test windows.
scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
-
- wm::MaximizeWindow(window1.get());
- wm::ActivateWindow(window1.get());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
+ wm::WindowState* window1_state = wm::GetWindowState(window1.get());
+ window1_state->Maximize();
+ window1_state->Activate();
+ EXPECT_TRUE(window1_state->IsActive());
// Rotate focus, this should move focus to window0.
WindowCycleController* controller =
Shell::GetInstance()->window_cycle_controller();
controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
+ EXPECT_TRUE(wm::GetWindowState(window0.get())->IsActive());
// One more time.
controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
+ EXPECT_TRUE(window1_state->IsActive());
}
// Cycles to a minimized window.
@@ -206,21 +207,23 @@ TEST_F(WindowCycleControllerTest, Minimized) {
// Create a couple of test windows.
scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
+ wm::WindowState* window0_state = wm::GetWindowState(window0.get());
+ wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- wm::MinimizeWindow(window1.get());
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
+ window1_state->Minimize();
+ window0_state->Activate();
+ EXPECT_TRUE(window0_state->IsActive());
// Rotate focus, this should move focus to window1 and unminimize it.
WindowCycleController* controller =
Shell::GetInstance()->window_cycle_controller();
controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_FALSE(wm::IsWindowMinimized(window1.get()));
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
+ EXPECT_FALSE(window1_state->IsMinimized());
+ EXPECT_TRUE(window1_state->IsActive());
// One more time back to w0.
controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
+ EXPECT_TRUE(window0_state->IsActive());
}
TEST_F(WindowCycleControllerTest, AlwaysOnTopWindow) {

Powered by Google App Engine
This is Rietveld 408576698