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

Unified Diff: ash/wm/window_selector_unittest.cc

Issue 22778002: Revert 216874 - Use overview mode for alt-tab cycling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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/wm/window_selector_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_selector_unittest.cc
===================================================================
--- ash/wm/window_selector_unittest.cc (revision 216889)
+++ ash/wm/window_selector_unittest.cc (working copy)
@@ -107,27 +107,6 @@
}
}
- void Cycle(WindowSelector::Direction direction) {
- if (!IsSelecting()) {
- std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
- mru_window_tracker()->BuildMruWindowList();
- ScopedVector<LayerAnimationObserver> animations;
- for (size_t i = 0; i < windows.size(); ++i)
- animations.push_back(new LayerAnimationObserver(windows[i]->layer()));
- ash::Shell::GetInstance()->window_selector_controller()->
- HandleCycleWindow(direction);
- for (size_t i = 0; i < animations.size(); ++i)
- animations[i]->WaitUntilDone();
- } else {
- ash::Shell::GetInstance()->window_selector_controller()->
- HandleCycleWindow(direction);
- }
- }
-
- void StopCycling() {
- ash::Shell::GetInstance()->window_selector_controller()->AltKeyReleased();
- }
-
gfx::RectF GetTransformedBounds(aura::Window* window) {
gfx::RectF bounds(window->layer()->bounds());
window->layer()->transform().TransformRect(&bounds);
@@ -146,11 +125,6 @@
event_generator.ClickLeftButton();
}
- bool IsSelecting() {
- return ash::Shell::GetInstance()->window_selector_controller()->
- IsSelecting();
- }
-
private:
aura::test::TestWindowDelegate wd;
@@ -177,29 +151,6 @@
EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
}
-// Tests entering overview mode with three windows and cycling through them.
-TEST_F(WindowSelectorTest, BasicCycle) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> window3(CreateWindow(bounds));
- wm::ActivateWindow(window3.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window3.get()));
-
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(IsSelecting());
- Cycle(WindowSelector::FORWARD);
- StopCycling();
- EXPECT_FALSE(IsSelecting());
- EXPECT_FALSE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-}
-
// Tests that overview mode is exited if the last remaining window is destroyed.
TEST_F(WindowSelectorTest, LastWindowDestroyed) {
gfx::Rect bounds(0, 0, 400, 400);
@@ -209,7 +160,8 @@
window1.reset();
window2.reset();
- EXPECT_FALSE(IsSelecting());
+ EXPECT_FALSE(ash::Shell::GetInstance()->window_selector_controller()->
+ IsSelecting());
}
// Tests that windows remain on the display they are currently on in overview
« no previous file with comments | « ash/wm/window_selector_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698