| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "chromeos/ime/component_extension_ime_manager.h" | 6 #include "chromeos/ime/component_extension_ime_manager.h" |
| 7 #include "chromeos/ime/extension_ime_util.h" | 7 #include "chromeos/ime/extension_ime_util.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 EXPECT_TRUE(hindi_list[0] == hindi_layout1 || hindi_list[0] == hindi_layout2); | 247 EXPECT_TRUE(hindi_list[0] == hindi_layout1 || hindi_list[0] == hindi_layout2); |
| 248 EXPECT_TRUE(hindi_list[1] == hindi_layout1 || hindi_list[1] == hindi_layout2); | 248 EXPECT_TRUE(hindi_list[1] == hindi_layout1 || hindi_list[1] == hindi_layout2); |
| 249 | 249 |
| 250 EXPECT_EQ(0UL, component_ext_mgr_->ListIMEByLanguage("ru").size()); | 250 EXPECT_EQ(0UL, component_ext_mgr_->ListIMEByLanguage("ru").size()); |
| 251 EXPECT_EQ(0UL, component_ext_mgr_->ListIMEByLanguage("").size()); | 251 EXPECT_EQ(0UL, component_ext_mgr_->ListIMEByLanguage("").size()); |
| 252 EXPECT_EQ(0UL, component_ext_mgr_->ListIMEByLanguage("invalid").size()); | 252 EXPECT_EQ(0UL, component_ext_mgr_->ListIMEByLanguage("invalid").size()); |
| 253 EXPECT_EQ(5UL, component_ext_mgr_->ListIMEByLanguage("en").size()); | 253 EXPECT_EQ(5UL, component_ext_mgr_->ListIMEByLanguage("en").size()); |
| 254 EXPECT_EQ(2UL, component_ext_mgr_->ListIMEByLanguage("ja").size()); | 254 EXPECT_EQ(2UL, component_ext_mgr_->ListIMEByLanguage("ja").size()); |
| 255 } | 255 } |
| 256 | 256 |
| 257 TEST_F(ComponentExtensionIMEManagerTest, GetAllIMEAsInputMethodDescriptor) { |
| 258 input_method::InputMethodDescriptors descriptors = |
| 259 component_ext_mgr_->GetAllIMEAsInputMethodDescriptor(); |
| 260 size_t total_ime_size = 0; |
| 261 for (size_t i = 0; i < ime_list_.size(); ++i) { |
| 262 total_ime_size += ime_list_[i].engines.size(); |
| 263 } |
| 264 EXPECT_EQ(total_ime_size, descriptors.size()); |
| 265 } |
| 266 |
| 257 } // namespace | 267 } // namespace |
| 258 | 268 |
| 259 } // namespace input_method | 269 } // namespace input_method |
| 260 } // namespace chromeos | 270 } // namespace chromeos |
| OLD | NEW |