| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 .WillRepeatedly((ReturnRef(cellular_networks_))); | 193 .WillRepeatedly((ReturnRef(cellular_networks_))); |
| 194 EXPECT_CALL(*mock_network_library_, virtual_networks()) | 194 EXPECT_CALL(*mock_network_library_, virtual_networks()) |
| 195 .Times(AnyNumber()) | 195 .Times(AnyNumber()) |
| 196 .WillRepeatedly((ReturnRef(virtual_networks_))); | 196 .WillRepeatedly((ReturnRef(virtual_networks_))); |
| 197 EXPECT_CALL(*mock_network_library_, connected_network()) | 197 EXPECT_CALL(*mock_network_library_, connected_network()) |
| 198 .Times(AnyNumber()) | 198 .Times(AnyNumber()) |
| 199 .WillRepeatedly((Return((const Network*)(NULL)))); | 199 .WillRepeatedly((Return((const Network*)(NULL)))); |
| 200 EXPECT_CALL(*mock_network_library_, connecting_network()) | 200 EXPECT_CALL(*mock_network_library_, connecting_network()) |
| 201 .Times(AnyNumber()) | 201 .Times(AnyNumber()) |
| 202 .WillRepeatedly((Return((const Network*)(NULL)))); | 202 .WillRepeatedly((Return((const Network*)(NULL)))); |
| 203 EXPECT_CALL(*mock_network_library_, virtual_network_connected()) |
| 204 .Times(AnyNumber()) |
| 205 .WillRepeatedly((Return(false))); |
| 203 | 206 |
| 204 // Set specific expectations for interesting functions: | 207 // Set specific expectations for interesting functions: |
| 205 | 208 |
| 206 // NetworkMenuButton::OnNetworkChanged() calls: | 209 // NetworkMenuButton::OnNetworkChanged() calls: |
| 207 EXPECT_CALL(*mock_network_library_, Connected()) | 210 EXPECT_CALL(*mock_network_library_, Connected()) |
| 208 .Times(AnyNumber()) | 211 .Times(AnyNumber()) |
| 209 .WillRepeatedly((Return(false))) | 212 .WillRepeatedly((Return(false))) |
| 210 .RetiresOnSaturation(); | 213 .RetiresOnSaturation(); |
| 211 EXPECT_CALL(*mock_network_library_, Connecting()) | 214 EXPECT_CALL(*mock_network_library_, Connecting()) |
| 212 .Times(AnyNumber()) | 215 .Times(AnyNumber()) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 test_api()->SetNetworkLibrary(NULL, false); | 315 test_api()->SetNetworkLibrary(NULL, false); |
| 313 if (mock_power_library_) | 316 if (mock_power_library_) |
| 314 test_api()->SetPowerLibrary(NULL, false); | 317 test_api()->SetPowerLibrary(NULL, false); |
| 315 if (mock_screen_lock_library_) | 318 if (mock_screen_lock_library_) |
| 316 test_api()->SetScreenLockLibrary(NULL, false); | 319 test_api()->SetScreenLockLibrary(NULL, false); |
| 317 if (mock_speech_synthesis_library_) | 320 if (mock_speech_synthesis_library_) |
| 318 test_api()->SetSpeechSynthesisLibrary(NULL, false); | 321 test_api()->SetSpeechSynthesisLibrary(NULL, false); |
| 319 } | 322 } |
| 320 | 323 |
| 321 } // namespace chromeos | 324 } // namespace chromeos |
| OLD | NEW |