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 "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
8 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
9 #include "chromeos/ime/component_extension_ime_manager.h" | 11 #include "chromeos/ime/component_extension_ime_manager.h" |
10 #include "chromeos/ime/composition_text.h" | 12 #include "chromeos/ime/composition_text.h" |
11 #include "chromeos/ime/input_method_descriptor.h" | 13 #include "chromeos/ime/input_method_descriptor.h" |
12 #include "chromeos/ime/input_method_manager.h" | 14 #include "chromeos/ime/input_method_manager.h" |
13 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
14 #include "content/public/test/test_utils.h" | 16 #include "content/public/test/test_utils.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 " id: 'ID4'," | 795 " id: 'ID4'," |
794 " label: 'LABEL4'," | 796 " label: 'LABEL4'," |
795 " style: 'separator'," | 797 " style: 'separator'," |
796 " visible: true," | 798 " visible: true," |
797 " checked: true" | 799 " checked: true" |
798 " }]" | 800 " }]" |
799 "});"; | 801 "});"; |
800 ASSERT_TRUE(content::ExecuteScript( | 802 ASSERT_TRUE(content::ExecuteScript( |
801 host->host_contents(), set_menu_item_test_script)); | 803 host->host_contents(), set_menu_item_test_script)); |
802 | 804 |
803 const InputMethodPropertyList& props = | 805 const ash::ime::InputMethodMenuItemList& props = |
804 InputMethodManager::Get()->GetCurrentInputMethodProperties(); | 806 ash::ime::InputMethodMenuManager::GetInstance()-> |
| 807 GetCurrentInputMethodMenuItemList(); |
805 ASSERT_EQ(5U, props.size()); | 808 ASSERT_EQ(5U, props.size()); |
806 | 809 |
807 EXPECT_EQ("ID0", props[0].key); | 810 EXPECT_EQ("ID0", props[0].key); |
808 EXPECT_EQ("ID1", props[1].key); | 811 EXPECT_EQ("ID1", props[1].key); |
809 EXPECT_EQ("ID2", props[2].key); | 812 EXPECT_EQ("ID2", props[2].key); |
810 EXPECT_EQ("ID3", props[3].key); | 813 EXPECT_EQ("ID3", props[3].key); |
811 EXPECT_EQ("ID4", props[4].key); | 814 EXPECT_EQ("ID4", props[4].key); |
812 | 815 |
813 EXPECT_EQ("LABEL1", props[1].label); | 816 EXPECT_EQ("LABEL1", props[1].label); |
814 EXPECT_EQ("LABEL2", props[2].label); | 817 EXPECT_EQ("LABEL2", props[2].label); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 } | 899 } |
897 } | 900 } |
898 | 901 |
899 IMEBridge::Get()->SetInputContextHandler(NULL); | 902 IMEBridge::Get()->SetInputContextHandler(NULL); |
900 IMEBridge::Get()->SetCandidateWindowHandler(NULL); | 903 IMEBridge::Get()->SetCandidateWindowHandler(NULL); |
901 } | 904 } |
902 | 905 |
903 } // namespace | 906 } // namespace |
904 } // namespace input_method | 907 } // namespace input_method |
905 } // namespace chromeos | 908 } // namespace chromeos |
OLD | NEW |