OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
6 | 6 |
7 #include "chrome/test/base/in_process_browser_test.h" | 7 #include "chrome/test/base/in_process_browser_test.h" |
8 #include "ui/base/accelerators/accelerator.h" | 8 #include "ui/base/accelerators/accelerator.h" |
9 #include "ui/base/keycodes/keyboard_codes.h" | 9 #include "ui/base/keycodes/keyboard_codes.h" |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 manager_->SwitchToPreviousInputMethod(); | 115 manager_->SwitchToPreviousInputMethod(); |
116 EXPECT_EQ("xkb:us::eng", manager_->current_input_method().id()); | 116 EXPECT_EQ("xkb:us::eng", manager_->current_input_method().id()); |
117 EXPECT_TRUE(manager_->SwitchInputMethod( | 117 EXPECT_TRUE(manager_->SwitchInputMethod( |
118 ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, false, false, false))); | 118 ui::Accelerator(ui::VKEY_DBE_SBCSCHAR, false, false, false))); |
119 EXPECT_EQ("xkb:jp::jpn", manager_->current_input_method().id()); | 119 EXPECT_EQ("xkb:jp::jpn", manager_->current_input_method().id()); |
120 manager_->SwitchToPreviousInputMethod(); | 120 manager_->SwitchToPreviousInputMethod(); |
121 EXPECT_EQ("xkb:us::eng", manager_->current_input_method().id()); | 121 EXPECT_EQ("xkb:us::eng", manager_->current_input_method().id()); |
122 EXPECT_TRUE(manager_->SwitchInputMethod( | 122 EXPECT_TRUE(manager_->SwitchInputMethod( |
123 ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, false, false, false))); | 123 ui::Accelerator(ui::VKEY_DBE_DBCSCHAR, false, false, false))); |
124 EXPECT_EQ("xkb:jp::jpn", manager_->current_input_method().id()); | 124 EXPECT_EQ("xkb:jp::jpn", manager_->current_input_method().id()); |
| 125 |
| 126 // Do the same tests for Korean. |
| 127 manager_->EnableInputMethods("ko", kKeyboardLayoutsOnly, "xkb:us::eng"); |
| 128 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); |
| 129 EXPECT_EQ("xkb:us::eng", manager_->current_input_method().id()); |
| 130 EXPECT_TRUE(manager_->SwitchInputMethod( |
| 131 ui::Accelerator(ui::VKEY_HANGUL, false, false, false))); |
| 132 EXPECT_EQ("xkb:kr:kr104:kor", manager_->current_input_method().id()); |
| 133 manager_->SwitchToPreviousInputMethod(); |
| 134 EXPECT_EQ("xkb:us::eng", manager_->current_input_method().id()); |
| 135 EXPECT_TRUE(manager_->SwitchInputMethod( |
| 136 ui::Accelerator(ui::VKEY_SPACE, true, false, false))); |
| 137 EXPECT_EQ("xkb:kr:kr104:kor", manager_->current_input_method().id()); |
125 } | 138 } |
126 | 139 |
127 } // namespace input_method | 140 } // namespace input_method |
128 } // namespace chromeos | 141 } // namespace chromeos |
OLD | NEW |