| 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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 xkeyboard_ = new MockXKeyboard; | 73 xkeyboard_ = new MockXKeyboard; |
| 74 manager_->SetXKeyboardForTesting(xkeyboard_); | 74 manager_->SetXKeyboardForTesting(xkeyboard_); |
| 75 | 75 |
| 76 ime_list_.clear(); | 76 ime_list_.clear(); |
| 77 | 77 |
| 78 ComponentExtensionIME ext1; | 78 ComponentExtensionIME ext1; |
| 79 ext1.id = "ext1_id"; | 79 ext1.id = "ext1_id"; |
| 80 ext1.description = "ext1_description"; | 80 ext1.description = "ext1_description"; |
| 81 ext1.path = base::FilePath("ext1_file_path"); | 81 ext1.path = base::FilePath("ext1_file_path"); |
| 82 | 82 |
| 83 IBusComponent::EngineDescription ext1_engine1; | 83 ComponentExtensionEngine ext1_engine1; |
| 84 ext1_engine1.engine_id = "ext1_engine1_engine_id"; | 84 ext1_engine1.engine_id = "ext1_engine1_engine_id"; |
| 85 ext1_engine1.display_name = "ext1_engine_1_display_name"; | 85 ext1_engine1.display_name = "ext1_engine_1_display_name"; |
| 86 ext1_engine1.language_code = "en"; | 86 ext1_engine1.language_code = "en"; |
| 87 ext1_engine1.layout = "us"; | 87 ext1_engine1.layouts.push_back("us"); |
| 88 ext1.engines.push_back(ext1_engine1); | 88 ext1.engines.push_back(ext1_engine1); |
| 89 | 89 |
| 90 ime_list_.push_back(ext1); | 90 ime_list_.push_back(ext1); |
| 91 | 91 |
| 92 ComponentExtensionIME ext2; | 92 ComponentExtensionIME ext2; |
| 93 ext2.id = "ext2_id"; | 93 ext2.id = "ext2_id"; |
| 94 ext2.description = "ext2_description"; | 94 ext2.description = "ext2_description"; |
| 95 ext2.path = base::FilePath("ext2_file_path"); | 95 ext2.path = base::FilePath("ext2_file_path"); |
| 96 | 96 |
| 97 IBusComponent::EngineDescription ext2_engine1; | 97 ComponentExtensionEngine ext2_engine1; |
| 98 ext2_engine1.engine_id = "ext2_engine1_engine_id"; | 98 ext2_engine1.engine_id = "ext2_engine1_engine_id"; |
| 99 ext2_engine1.display_name = "ext2_engine_1_display_name"; | 99 ext2_engine1.display_name = "ext2_engine_1_display_name"; |
| 100 ext2_engine1.language_code = "en"; | 100 ext2_engine1.language_code = "en"; |
| 101 ext2_engine1.layout = "us"; | 101 ext2_engine1.layouts.push_back("us"); |
| 102 ext2.engines.push_back(ext2_engine1); | 102 ext2.engines.push_back(ext2_engine1); |
| 103 | 103 |
| 104 ime_list_.push_back(ext2); | 104 ime_list_.push_back(ext2); |
| 105 } | 105 } |
| 106 | 106 |
| 107 virtual void TearDown() OVERRIDE { | 107 virtual void TearDown() OVERRIDE { |
| 108 delegate_ = NULL; | 108 delegate_ = NULL; |
| 109 controller_ = NULL; | 109 controller_ = NULL; |
| 110 candidate_window_controller_ = NULL; | 110 candidate_window_controller_ = NULL; |
| 111 xkeyboard_ = NULL; | 111 xkeyboard_ = NULL; |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); | 1197 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); |
| 1198 EXPECT_EQ(1, controller_->change_input_method_count_); | 1198 EXPECT_EQ(1, controller_->change_input_method_count_); |
| 1199 EXPECT_EQ(ext_id1, controller_->change_input_method_id_); | 1199 EXPECT_EQ(ext_id1, controller_->change_input_method_id_); |
| 1200 manager_->ChangeInputMethod(ext_id2); | 1200 manager_->ChangeInputMethod(ext_id2); |
| 1201 EXPECT_EQ(2, controller_->change_input_method_count_); | 1201 EXPECT_EQ(2, controller_->change_input_method_count_); |
| 1202 EXPECT_EQ(ext_id2, controller_->change_input_method_id_); | 1202 EXPECT_EQ(ext_id2, controller_->change_input_method_id_); |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 } // namespace input_method | 1205 } // namespace input_method |
| 1206 } // namespace chromeos | 1206 } // namespace chromeos |
| OLD | NEW |