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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 2923723002: Avoid toggling app list if interrupted by mouse (Closed)
Patch Set: Add unit test in accelerator_filter_unittest.cc Created 3 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
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index d5120d95f00fd9adc70880027c86db5d2a6aaa9d..14ec27d75f78f7021a3532b2620f1fc056abc865 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -884,6 +884,15 @@ TEST_F(AcceleratorControllerTest, GlobalAcceleratorsToggleAppList) {
CreateReleaseAccelerator(ui::VKEY_BROWSER_SEARCH, ui::EF_NONE)));
RunAllPendingInMessageLoop();
EXPECT_EQ(3u, test_app_list_presenter.toggle_count());
+
+ // When pressed key is interrupted by mouse, the AppList should not toggle.
+ EXPECT_FALSE(
+ ProcessInController(ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
+ GetController()->accelerator_history()->InterruptCurrentAccelerator();
+ EXPECT_FALSE(ProcessInController(
+ CreateReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
+ RunAllPendingInMessageLoop();
+ EXPECT_EQ(3u, test_app_list_presenter.toggle_count());
}
TEST_F(AcceleratorControllerTest, ImeGlobalAccelerators) {

Powered by Google App Engine
This is Rietveld 408576698