OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/cros/cros_mock.h" | 5 #include "chrome/browser/chromeos/cros/cros_mock.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" | 10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 .WillRepeatedly((ReturnRef(virtual_networks_))); | 168 .WillRepeatedly((ReturnRef(virtual_networks_))); |
169 EXPECT_CALL(*mock_network_library_, connected_network()) | 169 EXPECT_CALL(*mock_network_library_, connected_network()) |
170 .Times(AnyNumber()) | 170 .Times(AnyNumber()) |
171 .WillRepeatedly((Return((const Network*)(NULL)))); | 171 .WillRepeatedly((Return((const Network*)(NULL)))); |
172 EXPECT_CALL(*mock_network_library_, connecting_network()) | 172 EXPECT_CALL(*mock_network_library_, connecting_network()) |
173 .Times(AnyNumber()) | 173 .Times(AnyNumber()) |
174 .WillRepeatedly((Return((const Network*)(NULL)))); | 174 .WillRepeatedly((Return((const Network*)(NULL)))); |
175 EXPECT_CALL(*mock_network_library_, virtual_network_connected()) | 175 EXPECT_CALL(*mock_network_library_, virtual_network_connected()) |
176 .Times(AnyNumber()) | 176 .Times(AnyNumber()) |
177 .WillRepeatedly((Return(false))); | 177 .WillRepeatedly((Return(false))); |
| 178 EXPECT_CALL(*mock_network_library_, wifi_scanning()) |
| 179 .Times(AnyNumber()) |
| 180 .WillRepeatedly((Return(false))); |
178 | 181 |
179 // Set specific expectations for interesting functions: | 182 // Set specific expectations for interesting functions: |
180 | 183 |
181 // NetworkMenuButton::OnNetworkChanged() calls: | 184 // NetworkMenuButton::OnNetworkChanged() calls: |
182 EXPECT_CALL(*mock_network_library_, Connected()) | 185 EXPECT_CALL(*mock_network_library_, Connected()) |
183 .Times(AnyNumber()) | 186 .Times(AnyNumber()) |
184 .WillRepeatedly((Return(false))) | 187 .WillRepeatedly((Return(false))) |
185 .RetiresOnSaturation(); | 188 .RetiresOnSaturation(); |
186 EXPECT_CALL(*mock_network_library_, Connecting()) | 189 EXPECT_CALL(*mock_network_library_, Connecting()) |
187 .Times(AnyNumber()) | 190 .Times(AnyNumber()) |
(...skipping 23 matching lines...) Expand all Loading... |
211 // Prevent bogus gMock leak check from firing. | 214 // Prevent bogus gMock leak check from firing. |
212 if (loader_) | 215 if (loader_) |
213 test_api()->SetLibraryLoader(NULL, false); | 216 test_api()->SetLibraryLoader(NULL, false); |
214 if (mock_cryptohome_library_) | 217 if (mock_cryptohome_library_) |
215 test_api()->SetCryptohomeLibrary(NULL, false); | 218 test_api()->SetCryptohomeLibrary(NULL, false); |
216 if (mock_network_library_) | 219 if (mock_network_library_) |
217 test_api()->SetNetworkLibrary(NULL, false); | 220 test_api()->SetNetworkLibrary(NULL, false); |
218 } | 221 } |
219 | 222 |
220 } // namespace chromeos | 223 } // namespace chromeos |
OLD | NEW |