OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/ime/input_method_menu_item.h" | |
6 #include "ash/ime/input_method_menu_manager.h" | |
7 #include "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
8 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.h" |
10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 8 #include "chrome/browser/extensions/extension_test_message_listener.h" |
11 #include "chromeos/ime/component_extension_ime_manager.h" | 9 #include "chromeos/ime/component_extension_ime_manager.h" |
12 #include "chromeos/ime/composition_text.h" | 10 #include "chromeos/ime/composition_text.h" |
13 #include "chromeos/ime/input_method_descriptor.h" | 11 #include "chromeos/ime/input_method_descriptor.h" |
14 #include "chromeos/ime/input_method_manager.h" | 12 #include "chromeos/ime/input_method_manager.h" |
15 #include "content/public/test/browser_test_utils.h" | 13 #include "content/public/test/browser_test_utils.h" |
16 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 " id: 'ID4'," | 788 " id: 'ID4'," |
791 " label: 'LABEL4'," | 789 " label: 'LABEL4'," |
792 " style: 'separator'," | 790 " style: 'separator'," |
793 " visible: true," | 791 " visible: true," |
794 " checked: true" | 792 " checked: true" |
795 " }]" | 793 " }]" |
796 "});"; | 794 "});"; |
797 ASSERT_TRUE(content::ExecuteScript( | 795 ASSERT_TRUE(content::ExecuteScript( |
798 host->host_contents(), set_menu_item_test_script)); | 796 host->host_contents(), set_menu_item_test_script)); |
799 | 797 |
800 const ash::ime::InputMethodMenuItemList& props = | 798 const InputMethodPropertyList& props = |
801 ash::ime::InputMethodMenuManager::Get()-> | 799 InputMethodManager::Get()->GetCurrentInputMethodProperties(); |
802 GetCurrentInputMethodMenuItemList(); | |
803 ASSERT_EQ(5U, props.size()); | 800 ASSERT_EQ(5U, props.size()); |
804 | 801 |
805 EXPECT_EQ("ID0", props[0].key); | 802 EXPECT_EQ("ID0", props[0].key); |
806 EXPECT_EQ("ID1", props[1].key); | 803 EXPECT_EQ("ID1", props[1].key); |
807 EXPECT_EQ("ID2", props[2].key); | 804 EXPECT_EQ("ID2", props[2].key); |
808 EXPECT_EQ("ID3", props[3].key); | 805 EXPECT_EQ("ID3", props[3].key); |
809 EXPECT_EQ("ID4", props[4].key); | 806 EXPECT_EQ("ID4", props[4].key); |
810 | 807 |
811 EXPECT_EQ("LABEL1", props[1].label); | 808 EXPECT_EQ("LABEL1", props[1].label); |
812 EXPECT_EQ("LABEL2", props[2].label); | 809 EXPECT_EQ("LABEL2", props[2].label); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 } | 891 } |
895 } | 892 } |
896 | 893 |
897 IMEBridge::Get()->SetInputContextHandler(NULL); | 894 IMEBridge::Get()->SetInputContextHandler(NULL); |
898 IMEBridge::Get()->SetCandidateWindowHandler(NULL); | 895 IMEBridge::Get()->SetCandidateWindowHandler(NULL); |
899 } | 896 } |
900 | 897 |
901 } // namespace | 898 } // namespace |
902 } // namespace input_method | 899 } // namespace input_method |
903 } // namespace chromeos | 900 } // namespace chromeos |
OLD | NEW |