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" |
5 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
6 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
7 #include "chrome/browser/extensions/extension_test_message_listener.h" | 9 #include "chrome/browser/extensions/extension_test_message_listener.h" |
8 #include "chromeos/ime/component_extension_ime_manager.h" | 10 #include "chromeos/ime/component_extension_ime_manager.h" |
9 #include "chromeos/ime/composition_text.h" | 11 #include "chromeos/ime/composition_text.h" |
10 #include "chromeos/ime/input_method_descriptor.h" | 12 #include "chromeos/ime/input_method_descriptor.h" |
11 #include "chromeos/ime/input_method_manager.h" | 13 #include "chromeos/ime/input_method_manager.h" |
12 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
13 #include "content/public/test/test_utils.h" | 15 #include "content/public/test/test_utils.h" |
14 #include "extensions/common/manifest_handlers/background_info.h" | 16 #include "extensions/common/manifest_handlers/background_info.h" |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 " id: 'ID4'," | 781 " id: 'ID4'," |
780 " label: 'LABEL4'," | 782 " label: 'LABEL4'," |
781 " style: 'separator'," | 783 " style: 'separator'," |
782 " visible: true," | 784 " visible: true," |
783 " checked: true" | 785 " checked: true" |
784 " }]" | 786 " }]" |
785 "});"; | 787 "});"; |
786 ASSERT_TRUE(content::ExecuteScript( | 788 ASSERT_TRUE(content::ExecuteScript( |
787 host->host_contents(), set_menu_item_test_script)); | 789 host->host_contents(), set_menu_item_test_script)); |
788 | 790 |
789 const InputMethodPropertyList& props = | 791 const ash::ime::InputMethodMenuItemList& props = |
790 InputMethodManager::Get()->GetCurrentInputMethodProperties(); | 792 ash::ime::InputMethodMenuManager::Get()-> |
| 793 GetCurrentInputMethodMenuItemList(); |
791 ASSERT_EQ(5U, props.size()); | 794 ASSERT_EQ(5U, props.size()); |
792 | 795 |
793 EXPECT_EQ("ID0", props[0].key); | 796 EXPECT_EQ("ID0", props[0].key); |
794 EXPECT_EQ("ID1", props[1].key); | 797 EXPECT_EQ("ID1", props[1].key); |
795 EXPECT_EQ("ID2", props[2].key); | 798 EXPECT_EQ("ID2", props[2].key); |
796 EXPECT_EQ("ID3", props[3].key); | 799 EXPECT_EQ("ID3", props[3].key); |
797 EXPECT_EQ("ID4", props[4].key); | 800 EXPECT_EQ("ID4", props[4].key); |
798 | 801 |
799 EXPECT_EQ("LABEL1", props[1].label); | 802 EXPECT_EQ("LABEL1", props[1].label); |
800 EXPECT_EQ("LABEL2", props[2].label); | 803 EXPECT_EQ("LABEL2", props[2].label); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 } | 885 } |
883 } | 886 } |
884 | 887 |
885 IMEBridge::Get()->SetInputContextHandler(NULL); | 888 IMEBridge::Get()->SetInputContextHandler(NULL); |
886 IMEBridge::Get()->SetCandidateWindowHandler(NULL); | 889 IMEBridge::Get()->SetCandidateWindowHandler(NULL); |
887 } | 890 } |
888 | 891 |
889 } // namespace | 892 } // namespace |
890 } // namespace input_method | 893 } // namespace input_method |
891 } // namespace chromeos | 894 } // namespace chromeos |
OLD | NEW |