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

Unified Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal Created 4 years, 6 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/wm/window_cycle_controller.cc ('k') | ash/wm/window_cycle_list.h » ('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 4c8a7b97b5b8116523dba063ee57841683d565d9..13daabd23ab3900276791d62e72b45c2495549b4 100644
--- a/ash/wm/window_cycle_controller_unittest.cc
+++ b/ash/wm/window_cycle_controller_unittest.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <memory>
+#include "ash/aura/wm_window_aura.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/window_state.h"
#include "ash/session/session_state_delegate.h"
@@ -55,6 +56,10 @@ class KeyEventCounter : public ui::EventHandler {
DISALLOW_COPY_AND_ASSIGN(KeyEventCounter);
};
+bool IsWindowMinimized(aura::Window* window) {
+ return WmWindowAura::Get(window)->GetWindowState()->IsMinimized();
+}
+
} // namespace
using aura::test::CreateTestWindowWithId;
@@ -84,9 +89,9 @@ class WindowCycleControllerTest : public test::AshTestBase {
return window;
}
- const WindowCycleList::WindowList& GetWindows(
- WindowCycleController* controller) {
- return controller->window_cycle_list()->windows();
+ const aura::Window::Windows GetWindows(WindowCycleController* controller) {
+ return WmWindowAura::ToAuraWindows(
+ controller->window_cycle_list()->windows());
}
private:
@@ -517,19 +522,19 @@ TEST_F(WindowCycleControllerTest, CyclePreservesMinimization) {
wm::ActivateWindow(window1.get());
wm::GetWindowState(window1.get())->Minimize();
wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsWindowMinimized(window1.get()));
+ EXPECT_TRUE(IsWindowMinimized(window1.get()));
// On window 2.
controller->HandleCycleWindow(WindowCycleController::FORWARD);
- EXPECT_FALSE(wm::IsWindowMinimized(window1.get()));
+ EXPECT_FALSE(IsWindowMinimized(window1.get()));
// Back on window 1.
controller->HandleCycleWindow(WindowCycleController::FORWARD);
- EXPECT_TRUE(wm::IsWindowMinimized(window1.get()));
+ EXPECT_TRUE(IsWindowMinimized(window1.get()));
controller->StopCycling();
- EXPECT_TRUE(wm::IsWindowMinimized(window1.get()));
+ EXPECT_TRUE(IsWindowMinimized(window1.get()));
}
// Tests cycles between panel and normal windows.
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | ash/wm/window_cycle_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698