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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 10134036: Let Chrome app handle Ash accelerators first if the app is launched as a window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final rebase Created 8 years, 7 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.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 80e9a4b6ff8f68955bea8012ba11aaf0e3ab8930..502aafce009bf0e9ca5f288380e25b77fd33f406 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -363,6 +363,17 @@ TEST_F(AcceleratorControllerTest, Process) {
EXPECT_FALSE(GetController()->Process(accelerator_b));
}
+TEST_F(AcceleratorControllerTest, IsRegistered) {
+ const ui::Accelerator accelerator_a(ui::VKEY_A, false, false, false);
+ const ui::Accelerator accelerator_shift_a(ui::VKEY_A, true, false, false);
+ TestTarget target;
+ GetController()->Register(accelerator_a, &target);
+ EXPECT_TRUE(GetController()->IsRegistered(accelerator_a));
+ EXPECT_FALSE(GetController()->IsRegistered(accelerator_shift_a));
+ GetController()->UnregisterAll(&target);
+ EXPECT_FALSE(GetController()->IsRegistered(accelerator_a));
+}
+
#if defined(OS_WIN) || defined(USE_X11)
TEST_F(AcceleratorControllerTest, ProcessOnce) {
ui::Accelerator accelerator_a(ui::VKEY_A, false, false, false);
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/accelerators/accelerator_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698