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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |