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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 2234233002: Enable ash window cycle UI by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review Created 4 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 | « no previous file | ash/common/ash_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 58b8e5887a5cb230895860bed2bf1100732a62bb..650336b0b871eb1b241af705a6b4c3d02c0adc37 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -1124,9 +1124,15 @@ TEST_F(PreferredReservedAcceleratorsTest, AcceleratorsWithFullscreen) {
EXPECT_TRUE(test_api.is_animating_lock());
#endif
+ auto press_and_release_alt_tab = [&generator]() {
+ generator.PressKey(ui::VKEY_TAB, ui::EF_ALT_DOWN);
+ // Release the alt key to trigger the window activation.
+ generator.ReleaseKey(ui::VKEY_MENU, ui::EF_NONE);
+ };
+
// A fullscreen window can consume ALT-TAB (preferred).
ASSERT_EQ(w1, wm::GetActiveWindow());
- generator.PressKey(ui::VKEY_TAB, ui::EF_ALT_DOWN);
+ press_and_release_alt_tab();
ASSERT_EQ(w1, wm::GetActiveWindow());
ASSERT_NE(w2, wm::GetActiveWindow());
@@ -1141,7 +1147,7 @@ TEST_F(PreferredReservedAcceleratorsTest, AcceleratorsWithFullscreen) {
ASSERT_FALSE(w1_state->IsFullscreen());
EXPECT_EQ(w1, wm::GetActiveWindow());
- generator.PressKey(ui::VKEY_TAB, ui::EF_ALT_DOWN);
+ press_and_release_alt_tab();
ASSERT_NE(w1, wm::GetActiveWindow());
ASSERT_EQ(w2, wm::GetActiveWindow());
}
« no previous file with comments | « no previous file | ash/common/ash_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698