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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove DropSearchKey function Created 8 years, 1 month 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 7012f4f33aa2bcffbfd6ba162e1444b2e2ffa1cb..f8668d22b405f458b9e6eb785c34ac42be80d152 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -631,11 +631,17 @@ TEST_F(AcceleratorControllerTest, GlobalAccelerators) {
// ToggleAppList
{
EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
- EXPECT_TRUE(ProcessWithContext(
+ // Pressing the search key should do nothing, since the Search key can be
+ // used as a modifier for accessing extended keyboard shortcuts.
+ EXPECT_FALSE(ProcessWithContext(
ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
EXPECT_TRUE(ProcessWithContext(
+ ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
+ EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
+ EXPECT_FALSE(ProcessWithContext(
ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
+ EXPECT_TRUE(ProcessWithContext(
+ ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
}
// ToggleAppList (with spoken feedback enabled)
@@ -644,9 +650,13 @@ TEST_F(AcceleratorControllerTest, GlobalAccelerators) {
delegate->ToggleSpokenFeedback();
EXPECT_FALSE(ProcessWithContext(
ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
+ EXPECT_FALSE(ProcessWithContext(
+ ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
delegate->ToggleSpokenFeedback();
- EXPECT_TRUE(ProcessWithContext(
+ EXPECT_FALSE(ProcessWithContext(
ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
+ EXPECT_TRUE(ProcessWithContext(
+ ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
}
// DisableCapsLock
{

Powered by Google App Engine
This is Rietveld 408576698