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

Unified Diff: ash/focus_cycler_unittest.cc

Issue 181563004: Remove --ash-disable-overview-mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 6 years, 9 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/focus_cycler.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/focus_cycler_unittest.cc
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 66be1ed258c7e23120122d418ee2f7553a2e75b6..5b25d966b3c654e5b98679899092bd0b5bb413b3 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -252,13 +252,16 @@ TEST_F(FocusCyclerTest, CycleFocusNoBrowser) {
EXPECT_TRUE(tray()->GetWidget()->IsActive());
}
+// Tests that focus cycles from the active browser to the status area and back.
TEST_F(FocusCyclerTest, Shelf_CycleFocusForward) {
ASSERT_TRUE(CreateTray());
InstallFocusCycleOnShelf();
shelf_widget()->Hide();
- // Create a single test window.
+ // Create two test windows.
scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
+ wm::ActivateWindow(window1.get());
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -269,6 +272,10 @@ TEST_F(FocusCyclerTest, Shelf_CycleFocusForward) {
// Cycle focus to the browser.
focus_cycler()->RotateFocus(FocusCycler::FORWARD);
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
+
+ // Cycle focus to the status area.
+ focus_cycler()->RotateFocus(FocusCycler::FORWARD);
+ EXPECT_TRUE(tray()->GetWidget()->IsActive());
}
TEST_F(FocusCyclerTest, Shelf_CycleFocusBackwardInvisible) {
« no previous file with comments | « ash/focus_cycler.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698