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

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

Issue 190033005: [IME] Removes the duplicated IMEs in chrome://settings/languages, and support async component IMEs … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 "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 "chromeos/ime/mock_component_extension_ime_manager_delegate.h" 8 #include "chromeos/ime/mock_component_extension_ime_manager_delegate.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 EXPECT_EQ(1, on_initialized_callcount_); 129 EXPECT_EQ(1, on_initialized_callcount_);
130 component_ext_mgr_->RemoveObserver(this); 130 component_ext_mgr_->RemoveObserver(this);
131 } 131 }
132 132
133 protected: 133 protected:
134 MockComponentExtIMEManagerDelegate* mock_delegate_; 134 MockComponentExtIMEManagerDelegate* mock_delegate_;
135 scoped_ptr<ComponentExtensionIMEManager> component_ext_mgr_; 135 scoped_ptr<ComponentExtensionIMEManager> component_ext_mgr_;
136 std::vector<ComponentExtensionIME> ime_list_; 136 std::vector<ComponentExtensionIME> ime_list_;
137 137
138 private: 138 private:
139 virtual void OnInitialized() OVERRIDE { 139 virtual void OnImeComponentExtensionInitialized() OVERRIDE {
140 ++on_initialized_callcount_; 140 ++on_initialized_callcount_;
141 } 141 }
142 142
143 int on_initialized_callcount_; 143 int on_initialized_callcount_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerTest); 145 DISALLOW_COPY_AND_ASSIGN(ComponentExtensionIMEManagerTest);
146 }; 146 };
147 147
148 TEST_F(ComponentExtensionIMEManagerTest, LoadComponentExtensionIMETest) { 148 TEST_F(ComponentExtensionIMEManagerTest, LoadComponentExtensionIMETest) {
149 for (size_t i = 0; i < ime_list_.size(); ++i) { 149 for (size_t i = 0; i < ime_list_.size(); ++i) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 for (size_t i = 0; i < ime_list_.size(); ++i) { 246 for (size_t i = 0; i < ime_list_.size(); ++i) {
247 total_ime_size += ime_list_[i].engines.size(); 247 total_ime_size += ime_list_[i].engines.size();
248 } 248 }
249 EXPECT_EQ(total_ime_size, descriptors.size()); 249 EXPECT_EQ(total_ime_size, descriptors.size());
250 } 250 }
251 251
252 } // namespace 252 } // namespace
253 253
254 } // namespace input_method 254 } // namespace input_method
255 } // namespace chromeos 255 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698