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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 2923723002: Avoid toggling app list if interrupted by mouse (Closed)
Patch Set: Rebase and refactor is_interrupted_by_mouse_event() to interrupted_by_mouse_event() Created 3 years, 5 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/accelerators/accelerator_controller.cc ('k') | ash/accelerators/accelerator_filter_unittest.cc » ('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 6519ab0554fb9e4741120b2889249990f5483758..dd96caea8a5db6390c20ff44b5890f22f65748ea 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -862,6 +862,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) {
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/accelerators/accelerator_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698