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

Side by Side Diff: chromeos/ime/component_extension_ime_manager_unittest.cc

Issue 13197003: Introduce GetAllIMEAsInputMethodDescriptor function. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 8 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
« no previous file with comments | « chromeos/ime/component_extension_ime_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
OLDNEW
« no previous file with comments | « chromeos/ime/component_extension_ime_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698