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

Unified Diff: athena/wm/window_manager_unittest.cc

Issue 601333002: ESC accelerator and consistent overview mode for Athena homecard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 6 years, 2 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 | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_unittest.cc
diff --git a/athena/wm/window_manager_unittest.cc b/athena/wm/window_manager_unittest.cc
index a199a70e8a9787a959cb94d716ac956af75af078..3707516595744d7cf7f7952aaffe19098b3052f0 100644
--- a/athena/wm/window_manager_unittest.cc
+++ b/athena/wm/window_manager_unittest.cc
@@ -308,6 +308,23 @@ TEST_F(WindowManagerTest, NewWindowBounds) {
EXPECT_EQ(left_bounds.ToString(), third->bounds().ToString());
}
+TEST_F(WindowManagerTest, OverviewModeAccelerators) {
+ ui::test::EventGenerator generator(root_window());
+
+ // F6 toggles overview mode
+ ASSERT_FALSE(WindowManager::Get()->IsOverviewModeActive());
+ generator.PressKey(ui::VKEY_F6, ui::EF_NONE);
+ EXPECT_TRUE(WindowManager::Get()->IsOverviewModeActive());
+ generator.PressKey(ui::VKEY_F6, ui::EF_NONE);
+ EXPECT_FALSE(WindowManager::Get()->IsOverviewModeActive());
+
+ // ESC exits overview mode
+ generator.PressKey(ui::VKEY_F6, ui::EF_NONE);
+ EXPECT_TRUE(WindowManager::Get()->IsOverviewModeActive());
+ generator.PressKey(ui::VKEY_ESCAPE, ui::EF_NONE);
+ EXPECT_FALSE(WindowManager::Get()->IsOverviewModeActive());
+}
+
TEST_F(WindowManagerTest, SplitModeActivationByShortcut) {
test::WindowManagerImplTestApi wm_api;
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698