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 "chromeos/dbus/mock_dbus_thread_manager.h" | 5 #include "chromeos/dbus/mock_dbus_thread_manager.h" |
6 | 6 |
7 #include "chromeos/dbus/dbus_thread_manager_observer.h" | 7 #include "chromeos/dbus/dbus_thread_manager_observer.h" |
8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
10 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 10 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Called from AsyncMethodCaller ctor and dtor. | 156 // Called from AsyncMethodCaller ctor and dtor. |
157 EXPECT_CALL(*mock_cryptohome_client_.get(), SetAsyncCallStatusHandlers(_, _)) | 157 EXPECT_CALL(*mock_cryptohome_client_.get(), SetAsyncCallStatusHandlers(_, _)) |
158 .Times(AnyNumber()); | 158 .Times(AnyNumber()); |
159 EXPECT_CALL(*mock_cryptohome_client_.get(), ResetAsyncCallStatusHandlers()) | 159 EXPECT_CALL(*mock_cryptohome_client_.get(), ResetAsyncCallStatusHandlers()) |
160 .Times(AnyNumber()); | 160 .Times(AnyNumber()); |
161 // Called from various locations. | 161 // Called from various locations. |
162 EXPECT_CALL(*mock_cryptohome_client_.get(), GetSystemSalt(_)) | 162 EXPECT_CALL(*mock_cryptohome_client_.get(), GetSystemSalt(_)) |
163 .WillRepeatedly(DoAll(SetArgumentPointee<0>(*GetMockSystemSalt()), | 163 .WillRepeatedly(DoAll(SetArgumentPointee<0>(*GetMockSystemSalt()), |
164 Return(true))); | 164 Return(true))); |
| 165 EXPECT_CALL(*mock_cryptohome_client_.get(), TpmIsEnabled(_)) |
| 166 .Times(AnyNumber()); |
165 | 167 |
166 // Called from GeolocationHandler::Init(). | 168 // Called from GeolocationHandler::Init(). |
167 EXPECT_CALL(*mock_shill_manager_client_.get(), GetProperties(_)) | 169 EXPECT_CALL(*mock_shill_manager_client_.get(), GetProperties(_)) |
168 .Times(AnyNumber()); | 170 .Times(AnyNumber()); |
169 EXPECT_CALL(*mock_shill_manager_client_.get(), AddPropertyChangedObserver(_)) | 171 EXPECT_CALL(*mock_shill_manager_client_.get(), AddPropertyChangedObserver(_)) |
170 .Times(AnyNumber()); | 172 .Times(AnyNumber()); |
171 EXPECT_CALL(*mock_shill_manager_client_.get(), | 173 EXPECT_CALL(*mock_shill_manager_client_.get(), |
172 RemovePropertyChangedObserver(_)) | 174 RemovePropertyChangedObserver(_)) |
173 .Times(AnyNumber()); | 175 .Times(AnyNumber()); |
174 } | 176 } |
175 | 177 |
176 MockDBusThreadManager::~MockDBusThreadManager() { | 178 MockDBusThreadManager::~MockDBusThreadManager() { |
177 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, | 179 FOR_EACH_OBSERVER(DBusThreadManagerObserver, observers_, |
178 OnDBusThreadManagerDestroying(this)); | 180 OnDBusThreadManagerDestroying(this)); |
179 } | 181 } |
180 | 182 |
181 void MockDBusThreadManager::AddObserver(DBusThreadManagerObserver* observer) { | 183 void MockDBusThreadManager::AddObserver(DBusThreadManagerObserver* observer) { |
182 DCHECK(observer); | 184 DCHECK(observer); |
183 observers_.AddObserver(observer); | 185 observers_.AddObserver(observer); |
184 } | 186 } |
185 | 187 |
186 void MockDBusThreadManager::RemoveObserver( | 188 void MockDBusThreadManager::RemoveObserver( |
187 DBusThreadManagerObserver* observer) { | 189 DBusThreadManagerObserver* observer) { |
188 DCHECK(observer); | 190 DCHECK(observer); |
189 observers_.RemoveObserver(observer); | 191 observers_.RemoveObserver(observer); |
190 } | 192 } |
191 | 193 |
192 } // namespace chromeos | 194 } // namespace chromeos |
OLD | NEW |