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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc

Issue 10446010: wip: Add ui::EventType parameter. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wip - views_unittests 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/wm/system_gesture_event_filter.cc ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
index b351619fccb73fc9f0ec9b95d53cc54fdfafc326..2215f22c229e6a7bfb6a726840052d8e5e026a73 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
@@ -640,24 +640,24 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithUsLayouts) {
// Henkan, Muhenkan, ZenkakuHankaku should be ignored when no Japanese IMEs
// and keyboards are enabled.
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
// Do the same tests for Korean.
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN)));
+ ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
}
@@ -667,17 +667,17 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithJpLayout) {
EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
manager_->SwitchToPreviousInputMethod();
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
manager_->SwitchToPreviousInputMethod();
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
}
@@ -687,12 +687,12 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithKoLayout) {
EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:kr:kr104:kor", manager_->GetCurrentInputMethod().id());
manager_->SwitchToPreviousInputMethod();
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN)));
+ ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:kr:kr104:kor", manager_->GetCurrentInputMethod().id());
}
@@ -704,22 +704,22 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithJpIme) {
EXPECT_TRUE(manager_->EnableInputMethods(ids));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("mozc-jp", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("mozc-jp", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("mozc-jp", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
// Add Dvorak.
@@ -727,10 +727,10 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithJpIme) {
EXPECT_TRUE(manager_->EnableInputMethods(ids));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("mozc-jp", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id());
}
@@ -742,10 +742,10 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithKoIme) {
EXPECT_TRUE(manager_->EnableInputMethods(ids));
EXPECT_EQ("xkb:kr:kr104:kor", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("mozc-hangul", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_HANGUL, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:kr:kr104:kor", manager_->GetCurrentInputMethod().id());
// Add Dvorak.
@@ -753,10 +753,10 @@ TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithKoIme) {
EXPECT_TRUE(manager_->EnableInputMethods(ids));
EXPECT_EQ("xkb:kr:kr104:kor", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN)));
+ ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN, ui::ET_KEY_PRESSED)));
EXPECT_EQ("mozc-hangul", manager_->GetCurrentInputMethod().id());
EXPECT_TRUE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN)));
+ ui::Accelerator(ui::VKEY_SPACE, ui::EF_SHIFT_DOWN, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:kr:kr104:kor", manager_->GetCurrentInputMethod().id());
}
@@ -770,7 +770,7 @@ TEST_F(InputMethodManagerImplTest, TestEnableDisableHotkeys) {
EXPECT_FALSE(manager_->SwitchToPreviousInputMethod());
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
EXPECT_FALSE(manager_->SwitchInputMethod(
- ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE)));
+ ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE, ui::ET_KEY_PRESSED)));
EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id());
manager_->EnableHotkeys();
EXPECT_TRUE(manager_->SwitchToNextInputMethod());
« no previous file with comments | « ash/wm/system_gesture_event_filter.cc ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698