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_impl.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 candidate_window_controller_->NotifyCandidateWindowOpened(); | 226 candidate_window_controller_->NotifyCandidateWindowOpened(); |
227 EXPECT_EQ(2, observer.candidate_window_opened_count_); | 227 EXPECT_EQ(2, observer.candidate_window_opened_count_); |
228 candidate_window_controller_->NotifyCandidateWindowClosed(); | 228 candidate_window_controller_->NotifyCandidateWindowClosed(); |
229 EXPECT_EQ(2, observer.candidate_window_closed_count_); | 229 EXPECT_EQ(2, observer.candidate_window_closed_count_); |
230 manager_->RemoveCandidateWindowObserver(&observer); | 230 manager_->RemoveCandidateWindowObserver(&observer); |
231 } | 231 } |
232 | 232 |
233 TEST_F(InputMethodManagerImplTest, TestObserver) { | 233 TEST_F(InputMethodManagerImplTest, TestObserver) { |
234 // For http://crbug.com/19655#c11 - (3). browser_state_monitor_unittest.cc is | 234 // For http://crbug.com/19655#c11 - (3). browser_state_monitor_unittest.cc is |
235 // also for the scenario. | 235 // also for the scenario. |
236 std::vector<std::string> keyboard_layouts; | |
237 keyboard_layouts.push_back("xkb:us::eng"); | |
238 | |
236 TestObserver observer; | 239 TestObserver observer; |
237 InitComponentExtension(); | 240 InitComponentExtension(); |
238 manager_->AddObserver(&observer); | 241 manager_->AddObserver(&observer); |
239 EXPECT_EQ(0, observer.input_method_changed_count_); | 242 EXPECT_EQ(0, observer.input_method_changed_count_); |
240 manager_->EnableLoginLayouts("en-US", "xkb:us::eng"); | 243 manager_->EnableLoginLayouts("en-US", keyboard_layouts); |
241 EXPECT_EQ(1, observer.input_method_changed_count_); | 244 EXPECT_EQ(1, observer.input_method_changed_count_); |
242 EXPECT_EQ(1, observer.input_method_property_changed_count_); | 245 EXPECT_EQ(1, observer.input_method_property_changed_count_); |
243 manager_->ChangeInputMethod("xkb:us:dvorak:eng"); | 246 manager_->ChangeInputMethod("xkb:us:dvorak:eng"); |
244 EXPECT_FALSE(observer.last_show_message_); | 247 EXPECT_FALSE(observer.last_show_message_); |
245 EXPECT_EQ(2, observer.input_method_changed_count_); | 248 EXPECT_EQ(2, observer.input_method_changed_count_); |
246 EXPECT_EQ(2, observer.input_method_property_changed_count_); | 249 EXPECT_EQ(2, observer.input_method_property_changed_count_); |
247 manager_->ChangeInputMethod("xkb:us:dvorak:eng"); | 250 manager_->ChangeInputMethod("xkb:us:dvorak:eng"); |
248 EXPECT_FALSE(observer.last_show_message_); | 251 EXPECT_FALSE(observer.last_show_message_); |
249 | 252 |
250 // The observer is always notified even when the same input method ID is | 253 // The observer is always notified even when the same input method ID is |
(...skipping 25 matching lines...) Expand all Loading... | |
276 "xkb:us:dvorak:eng"); | 279 "xkb:us:dvorak:eng"); |
277 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); | 280 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); |
278 id_to_find = manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId( | 281 id_to_find = manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId( |
279 "xkb:fr::fra"); | 282 "xkb:fr::fra"); |
280 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); | 283 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); |
281 } | 284 } |
282 | 285 |
283 TEST_F(InputMethodManagerImplTest, TestEnableLayouts) { | 286 TEST_F(InputMethodManagerImplTest, TestEnableLayouts) { |
284 // Currently 5 keyboard layouts are supported for en-US, and 1 for ja. See | 287 // Currently 5 keyboard layouts are supported for en-US, and 1 for ja. See |
285 // ibus_input_method.txt. | 288 // ibus_input_method.txt. |
289 std::vector<std::string> keyboard_layouts; | |
290 | |
286 InitComponentExtension(); | 291 InitComponentExtension(); |
287 manager_->EnableLoginLayouts("en-US", ""); | 292 manager_->EnableLoginLayouts("en-US", keyboard_layouts); |
288 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); | 293 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); |
289 for (size_t i = 0; i < manager_->GetActiveInputMethodIds().size(); ++i) | 294 for (size_t i = 0; i < manager_->GetActiveInputMethodIds().size(); ++i) |
290 LOG(ERROR) << manager_->GetActiveInputMethodIds().at(i); | 295 LOG(ERROR) << manager_->GetActiveInputMethodIds().at(i); |
291 | 296 |
292 // For http://crbug.com/19655#c11 - (5) | 297 // For http://crbug.com/19655#c11 - (5) |
293 // The hardware keyboard layout "xkb:us::eng" is always active, hence 2U. | 298 // The hardware keyboard layout "xkb:us::eng" is always active, hence 2U. |
294 manager_->EnableLoginLayouts("ja", ""); // Japanese | 299 manager_->EnableLoginLayouts("ja", keyboard_layouts); // Japanese |
295 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); | 300 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); |
296 } | 301 } |
297 | 302 |
298 TEST_F(InputMethodManagerImplTest, TestEnableLayoutsAndCurrentInputMethod) { | 303 TEST_F(InputMethodManagerImplTest, TestEnableLayoutsAndCurrentInputMethod) { |
299 // For http://crbug.com/329061 | 304 // For http://crbug.com/329061 |
300 manager_->EnableLoginLayouts("en-US", "xkb:se::swe"); | 305 std::vector<std::string> keyboard_layouts; |
306 keyboard_layouts.push_back("xkb:se::swe"); | |
307 | |
308 manager_->EnableLoginLayouts("en-US", keyboard_layouts); | |
301 const std::string im_id = manager_->GetCurrentInputMethod().id(); | 309 const std::string im_id = manager_->GetCurrentInputMethod().id(); |
302 EXPECT_EQ("xkb:se::swe", im_id); | 310 EXPECT_EQ("xkb:se::swe", im_id); |
303 } | 311 } |
304 | 312 |
305 TEST_F(InputMethodManagerImplTest, TestEnableLayoutsNonUsHardwareKeyboard) { | 313 TEST_F(InputMethodManagerImplTest, TestEnableLayoutsNonUsHardwareKeyboard) { |
314 std::vector<std::string> keyboard_layouts; | |
315 | |
306 // The physical layout is French. | 316 // The physical layout is French. |
307 delegate_->set_hardware_keyboard_layout("xkb:fr::fra"); | 317 keyboard_layouts.push_back("xkb:fr::fra"); |
308 manager_->EnableLoginLayouts("en-US", ""); | 318 delegate_->set_hardware_keyboard_layout(keyboard_layouts); |
319 keyboard_layouts.clear(); | |
320 manager_->EnableLoginLayouts("en-US", keyboard_layouts); | |
309 EXPECT_EQ(6U, manager_->GetNumActiveInputMethods()); // 5 + French | 321 EXPECT_EQ(6U, manager_->GetNumActiveInputMethods()); // 5 + French |
310 // The physical layout is Japanese. | 322 // The physical layout is Japanese. |
311 delegate_->set_hardware_keyboard_layout("xkb:jp::jpn"); | 323 keyboard_layouts.push_back("xkb:jp::jpn"); |
312 manager_->EnableLoginLayouts("ja", ""); | 324 delegate_->set_hardware_keyboard_layout(keyboard_layouts); |
325 keyboard_layouts.clear(); | |
326 manager_->EnableLoginLayouts("ja", keyboard_layouts); | |
313 // "xkb:us::eng" is not needed, hence 1. | 327 // "xkb:us::eng" is not needed, hence 1. |
314 EXPECT_EQ(1U, manager_->GetNumActiveInputMethods()); | 328 EXPECT_EQ(1U, manager_->GetNumActiveInputMethods()); |
315 | 329 |
316 // The physical layout is Russian. | 330 // The physical layout is Russian. |
317 delegate_->set_hardware_keyboard_layout("xkb:ru::rus"); | 331 keyboard_layouts.push_back("xkb:ru::rus"); |
318 manager_->EnableLoginLayouts("ru", ""); | 332 delegate_->set_hardware_keyboard_layout(keyboard_layouts); |
333 keyboard_layouts.clear(); | |
334 manager_->EnableLoginLayouts("ru", keyboard_layouts); | |
319 // "xkb:us::eng" only. | 335 // "xkb:us::eng" only. |
320 EXPECT_EQ(1U, manager_->GetNumActiveInputMethods()); | 336 EXPECT_EQ(1U, manager_->GetNumActiveInputMethods()); |
321 EXPECT_EQ("xkb:us::eng", manager_->GetActiveInputMethodIds().front()); | 337 EXPECT_EQ("xkb:us::eng", manager_->GetActiveInputMethodIds().front()); |
322 } | 338 } |
323 | 339 |
340 TEST_F(InputMethodManagerImplTest, TestEnableMultipleHardwareKeyboardLayout) { | |
341 std::vector<std::string> keyboard_layouts; | |
342 | |
343 // The physical layouts are French and Hungarian. | |
344 keyboard_layouts.push_back("xkb:fr::fra"); | |
345 keyboard_layouts.push_back("xkb:hu::hun"); | |
346 delegate_->set_hardware_keyboard_layout(keyboard_layouts); | |
347 keyboard_layouts.clear(); | |
348 manager_->EnableLoginLayouts("en-US", keyboard_layouts); | |
349 // 5 + French + Hungarian | |
350 EXPECT_EQ(7U, manager_->GetNumActiveInputMethods()); | |
Alexander Alekseev
2014/02/11 13:36:02
Please add:
keyboard_layouts="xkb:us::eng,xkb:ru:
Seigo Nonaka
2014/02/12 13:21:02
Done.
| |
351 } | |
352 | |
324 TEST_F(InputMethodManagerImplTest, TestActiveInputMethods) { | 353 TEST_F(InputMethodManagerImplTest, TestActiveInputMethods) { |
325 manager_->EnableLoginLayouts("ja", ""); // Japanese | 354 std::vector<std::string> keyboard_layouts; |
355 manager_->EnableLoginLayouts("ja", keyboard_layouts); // Japanese | |
326 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); | 356 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); |
327 scoped_ptr<InputMethodDescriptors> methods( | 357 scoped_ptr<InputMethodDescriptors> methods( |
328 manager_->GetActiveInputMethods()); | 358 manager_->GetActiveInputMethods()); |
329 ASSERT_TRUE(methods.get()); | 359 ASSERT_TRUE(methods.get()); |
330 EXPECT_EQ(2U, methods->size()); | 360 EXPECT_EQ(2U, methods->size()); |
331 const InputMethodDescriptor* id_to_find = | 361 const InputMethodDescriptor* id_to_find = |
332 manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId( | 362 manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId( |
333 "xkb:us::eng"); | 363 "xkb:us::eng"); |
334 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); | 364 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); |
335 id_to_find = manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId( | 365 id_to_find = manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId( |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 manager_->SetCurrentInputMethodProperties(current_property_list); | 699 manager_->SetCurrentInputMethodProperties(current_property_list); |
670 ASSERT_EQ(1U, manager_->GetCurrentInputMethodProperties().size()); | 700 ASSERT_EQ(1U, manager_->GetCurrentInputMethodProperties().size()); |
671 EXPECT_EQ("key-chewing", | 701 EXPECT_EQ("key-chewing", |
672 manager_->GetCurrentInputMethodProperties().at(0).key); | 702 manager_->GetCurrentInputMethodProperties().at(0).key); |
673 } | 703 } |
674 | 704 |
675 TEST_F(InputMethodManagerImplTest, TestNextInputMethod) { | 705 TEST_F(InputMethodManagerImplTest, TestNextInputMethod) { |
676 TestObserver observer; | 706 TestObserver observer; |
677 manager_->AddObserver(&observer); | 707 manager_->AddObserver(&observer); |
678 InitComponentExtension(); | 708 InitComponentExtension(); |
709 std::vector<std::string> keyboard_layouts; | |
710 keyboard_layouts.push_back("xkb:us::eng"); | |
679 // For http://crbug.com/19655#c11 - (1) | 711 // For http://crbug.com/19655#c11 - (1) |
680 manager_->EnableLoginLayouts("en-US", "xkb:us::eng"); | 712 manager_->EnableLoginLayouts("en-US", keyboard_layouts); |
681 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); | 713 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); |
682 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); | 714 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); |
683 EXPECT_EQ("us", xkeyboard_->last_layout_); | 715 EXPECT_EQ("us", xkeyboard_->last_layout_); |
684 manager_->SwitchToNextInputMethod(); | 716 manager_->SwitchToNextInputMethod(); |
685 EXPECT_TRUE(observer.last_show_message_); | 717 EXPECT_TRUE(observer.last_show_message_); |
686 EXPECT_EQ("xkb:us:intl:eng", manager_->GetCurrentInputMethod().id()); | 718 EXPECT_EQ("xkb:us:intl:eng", manager_->GetCurrentInputMethod().id()); |
687 EXPECT_EQ("us(intl)", xkeyboard_->last_layout_); | 719 EXPECT_EQ("us(intl)", xkeyboard_->last_layout_); |
688 manager_->SwitchToNextInputMethod(); | 720 manager_->SwitchToNextInputMethod(); |
689 EXPECT_TRUE(observer.last_show_message_); | 721 EXPECT_TRUE(observer.last_show_message_); |
690 EXPECT_EQ("xkb:us:altgr-intl:eng", manager_->GetCurrentInputMethod().id()); | 722 EXPECT_EQ("xkb:us:altgr-intl:eng", manager_->GetCurrentInputMethod().id()); |
(...skipping 17 matching lines...) Expand all Loading... | |
708 TEST_F(InputMethodManagerImplTest, TestPreviousInputMethod) { | 740 TEST_F(InputMethodManagerImplTest, TestPreviousInputMethod) { |
709 TestObserver observer; | 741 TestObserver observer; |
710 manager_->AddObserver(&observer); | 742 manager_->AddObserver(&observer); |
711 InitComponentExtension(); | 743 InitComponentExtension(); |
712 | 744 |
713 ui::Accelerator keydown_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); | 745 ui::Accelerator keydown_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); |
714 keydown_accelerator.set_type(ui::ET_KEY_PRESSED); | 746 keydown_accelerator.set_type(ui::ET_KEY_PRESSED); |
715 ui::Accelerator keyup_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); | 747 ui::Accelerator keyup_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); |
716 keyup_accelerator.set_type(ui::ET_KEY_RELEASED); | 748 keyup_accelerator.set_type(ui::ET_KEY_RELEASED); |
717 | 749 |
718 manager_->EnableLoginLayouts("en-US", "xkb:us::eng"); | 750 std::vector<std::string> keyboard_layouts; |
751 keyboard_layouts.push_back("xkb:us::eng"); | |
752 manager_->EnableLoginLayouts("en-US", keyboard_layouts); | |
719 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); | 753 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); |
720 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); | 754 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); |
721 EXPECT_EQ("us", xkeyboard_->last_layout_); | 755 EXPECT_EQ("us", xkeyboard_->last_layout_); |
722 EXPECT_TRUE(manager_->SwitchToNextInputMethod()); | 756 EXPECT_TRUE(manager_->SwitchToNextInputMethod()); |
723 EXPECT_TRUE(observer.last_show_message_); | 757 EXPECT_TRUE(observer.last_show_message_); |
724 EXPECT_EQ("xkb:us:intl:eng", manager_->GetCurrentInputMethod().id()); | 758 EXPECT_EQ("xkb:us:intl:eng", manager_->GetCurrentInputMethod().id()); |
725 EXPECT_EQ("us(intl)", xkeyboard_->last_layout_); | 759 EXPECT_EQ("us(intl)", xkeyboard_->last_layout_); |
726 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keydown_accelerator)); | 760 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keydown_accelerator)); |
727 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keyup_accelerator)); | 761 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keyup_accelerator)); |
728 EXPECT_TRUE(observer.last_show_message_); | 762 EXPECT_TRUE(observer.last_show_message_); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
781 EXPECT_FALSE(manager_->SwitchToPreviousInputMethod(keydown_accelerator)); | 815 EXPECT_FALSE(manager_->SwitchToPreviousInputMethod(keydown_accelerator)); |
782 EXPECT_FALSE(manager_->SwitchToPreviousInputMethod(keyup_accelerator)); | 816 EXPECT_FALSE(manager_->SwitchToPreviousInputMethod(keyup_accelerator)); |
783 | 817 |
784 manager_->RemoveObserver(&observer); | 818 manager_->RemoveObserver(&observer); |
785 } | 819 } |
786 | 820 |
787 TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithUsLayouts) { | 821 TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithUsLayouts) { |
788 TestObserver observer; | 822 TestObserver observer; |
789 manager_->AddObserver(&observer); | 823 manager_->AddObserver(&observer); |
790 InitComponentExtension(); | 824 InitComponentExtension(); |
791 manager_->EnableLoginLayouts("en-US", "xkb:us::eng"); | 825 std::vector<std::string> keyboard_layouts; |
826 keyboard_layouts.push_back("xkb:us::eng"); | |
827 manager_->EnableLoginLayouts("en-US", keyboard_layouts); | |
792 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); | 828 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); |
793 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); | 829 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); |
794 EXPECT_EQ("us", xkeyboard_->last_layout_); | 830 EXPECT_EQ("us", xkeyboard_->last_layout_); |
795 | 831 |
796 // Henkan, Muhenkan, ZenkakuHankaku should be ignored when no Japanese IMEs | 832 // Henkan, Muhenkan, ZenkakuHankaku should be ignored when no Japanese IMEs |
797 // and keyboards are enabled. | 833 // and keyboards are enabled. |
798 EXPECT_FALSE(manager_->SwitchInputMethod( | 834 EXPECT_FALSE(manager_->SwitchInputMethod( |
799 ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE))); | 835 ui::Accelerator(ui::VKEY_CONVERT, ui::EF_NONE))); |
800 EXPECT_FALSE(observer.last_show_message_); | 836 EXPECT_FALSE(observer.last_show_message_); |
801 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); | 837 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); |
(...skipping 16 matching lines...) Expand all Loading... | |
818 | 854 |
819 TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithJpLayout) { | 855 TEST_F(InputMethodManagerImplTest, TestSwitchInputMethodWithJpLayout) { |
820 // Enable "xkb:jp::jpn" and press Muhenkan/ZenkakuHankaku. | 856 // Enable "xkb:jp::jpn" and press Muhenkan/ZenkakuHankaku. |
821 InitComponentExtension(); | 857 InitComponentExtension(); |
822 | 858 |
823 ui::Accelerator keydown_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); | 859 ui::Accelerator keydown_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); |
824 keydown_accelerator.set_type(ui::ET_KEY_PRESSED); | 860 keydown_accelerator.set_type(ui::ET_KEY_PRESSED); |
825 ui::Accelerator keyup_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); | 861 ui::Accelerator keyup_accelerator(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN); |
826 keyup_accelerator.set_type(ui::ET_KEY_RELEASED); | 862 keyup_accelerator.set_type(ui::ET_KEY_RELEASED); |
827 | 863 |
828 manager_->EnableLoginLayouts("ja", "xkb:us::eng"); | 864 std::vector<std::string> keyboard_layouts; |
865 keyboard_layouts.push_back("xkb:us::eng"); | |
866 manager_->EnableLoginLayouts("ja", keyboard_layouts); | |
829 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); | 867 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); |
830 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); | 868 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); |
831 EXPECT_EQ("us", xkeyboard_->last_layout_); | 869 EXPECT_EQ("us", xkeyboard_->last_layout_); |
832 EXPECT_TRUE(manager_->SwitchInputMethod( | 870 EXPECT_TRUE(manager_->SwitchInputMethod( |
833 ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE))); | 871 ui::Accelerator(ui::VKEY_NONCONVERT, ui::EF_NONE))); |
834 EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id()); | 872 EXPECT_EQ("xkb:jp::jpn", manager_->GetCurrentInputMethod().id()); |
835 EXPECT_EQ("jp", xkeyboard_->last_layout_); | 873 EXPECT_EQ("jp", xkeyboard_->last_layout_); |
836 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keydown_accelerator)); | 874 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keydown_accelerator)); |
837 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keyup_accelerator)); | 875 EXPECT_TRUE(manager_->SwitchToPreviousInputMethod(keyup_accelerator)); |
838 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); | 876 EXPECT_EQ("xkb:us::eng", manager_->GetCurrentInputMethod().id()); |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1143 ids.push_back(ext_id2); | 1181 ids.push_back(ext_id2); |
1144 EXPECT_TRUE(manager_->EnableInputMethods(ids)); | 1182 EXPECT_TRUE(manager_->EnableInputMethods(ids)); |
1145 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); | 1183 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); |
1146 EXPECT_EQ(ext_id1, manager_->GetCurrentInputMethod().id()); | 1184 EXPECT_EQ(ext_id1, manager_->GetCurrentInputMethod().id()); |
1147 manager_->ChangeInputMethod(ext_id2); | 1185 manager_->ChangeInputMethod(ext_id2); |
1148 EXPECT_EQ(ext_id2, manager_->GetCurrentInputMethod().id()); | 1186 EXPECT_EQ(ext_id2, manager_->GetCurrentInputMethod().id()); |
1149 } | 1187 } |
1150 | 1188 |
1151 } // namespace input_method | 1189 } // namespace input_method |
1152 } // namespace chromeos | 1190 } // namespace chromeos |
OLD | NEW |