Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc

Issue 165783002: Reland of: Split out InputMethodMenuManager from InputMethodManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 " id: 'ID4'," 790 " id: 'ID4',"
789 " label: 'LABEL4'," 791 " label: 'LABEL4',"
790 " style: 'separator'," 792 " style: 'separator',"
791 " visible: true," 793 " visible: true,"
792 " checked: true" 794 " checked: true"
793 " }]" 795 " }]"
794 "});"; 796 "});";
795 ASSERT_TRUE(content::ExecuteScript( 797 ASSERT_TRUE(content::ExecuteScript(
796 host->host_contents(), set_menu_item_test_script)); 798 host->host_contents(), set_menu_item_test_script));
797 799
798 const InputMethodPropertyList& props = 800 const ash::ime::InputMethodMenuItemList& props =
799 InputMethodManager::Get()->GetCurrentInputMethodProperties(); 801 ash::ime::InputMethodMenuManager::GetInstance()->
802 GetCurrentInputMethodMenuItemList();
800 ASSERT_EQ(5U, props.size()); 803 ASSERT_EQ(5U, props.size());
801 804
802 EXPECT_EQ("ID0", props[0].key); 805 EXPECT_EQ("ID0", props[0].key);
803 EXPECT_EQ("ID1", props[1].key); 806 EXPECT_EQ("ID1", props[1].key);
804 EXPECT_EQ("ID2", props[2].key); 807 EXPECT_EQ("ID2", props[2].key);
805 EXPECT_EQ("ID3", props[3].key); 808 EXPECT_EQ("ID3", props[3].key);
806 EXPECT_EQ("ID4", props[4].key); 809 EXPECT_EQ("ID4", props[4].key);
807 810
808 EXPECT_EQ("LABEL1", props[1].label); 811 EXPECT_EQ("LABEL1", props[1].label);
809 EXPECT_EQ("LABEL2", props[2].label); 812 EXPECT_EQ("LABEL2", props[2].label);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } 894 }
892 } 895 }
893 896
894 IMEBridge::Get()->SetInputContextHandler(NULL); 897 IMEBridge::Get()->SetInputContextHandler(NULL);
895 IMEBridge::Get()->SetCandidateWindowHandler(NULL); 898 IMEBridge::Get()->SetCandidateWindowHandler(NULL);
896 } 899 }
897 900
898 } // namespace 901 } // namespace
899 } // namespace input_method 902 } // namespace input_method
900 } // namespace chromeos 903 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698