| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/browser/browser_process.h" | |
| 11 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" | 10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" |
| 12 #include "chrome/browser/chromeos/cros/mock_input_method_library.h" | 11 #include "chrome/browser/chromeos/cros/mock_input_method_library.h" |
| 13 #include "chrome/browser/chromeos/cros/mock_keyboard_library.h" | 12 #include "chrome/browser/chromeos/cros/mock_keyboard_library.h" |
| 14 #include "chrome/browser/chromeos/cros/mock_library_loader.h" | 13 #include "chrome/browser/chromeos/cros/mock_library_loader.h" |
| 15 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 14 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
| 16 #include "chrome/browser/chromeos/cros/mock_power_library.h" | 15 #include "chrome/browser/chromeos/cros/mock_power_library.h" |
| 17 #include "chrome/browser/chromeos/cros/mock_screen_lock_library.h" | 16 #include "chrome/browser/chromeos/cros/mock_screen_lock_library.h" |
| 18 #include "chrome/browser/chromeos/cros/mock_speech_synthesis_library.h" | 17 #include "chrome/browser/chromeos/cros/mock_speech_synthesis_library.h" |
| 19 #include "chrome/browser/chromeos/cros/mock_system_library.h" | 18 #include "chrome/browser/chromeos/cros/mock_system_library.h" |
| 20 #include "chrome/browser/chromeos/cros/mock_touchpad_library.h" | 19 #include "chrome/browser/chromeos/cros/mock_touchpad_library.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 328 |
| 330 // NetworkMenu::InitMenuItems() calls: | 329 // NetworkMenu::InitMenuItems() calls: |
| 331 EXPECT_CALL(*mock_network_library_, ethernet_connected()) | 330 EXPECT_CALL(*mock_network_library_, ethernet_connected()) |
| 332 .Times(1) | 331 .Times(1) |
| 333 .WillRepeatedly((Return(false))) | 332 .WillRepeatedly((Return(false))) |
| 334 .RetiresOnSaturation(); | 333 .RetiresOnSaturation(); |
| 335 EXPECT_CALL(*mock_network_library_, ethernet_connecting()) | 334 EXPECT_CALL(*mock_network_library_, ethernet_connecting()) |
| 336 .Times(1) | 335 .Times(1) |
| 337 .WillRepeatedly((Return(false))) | 336 .WillRepeatedly((Return(false))) |
| 338 .RetiresOnSaturation(); | 337 .RetiresOnSaturation(); |
| 339 | |
| 340 } | 338 } |
| 341 | 339 |
| 342 void CrosMock::SetPowerLibraryStatusAreaExpectations() { | 340 void CrosMock::SetPowerLibraryStatusAreaExpectations() { |
| 343 EXPECT_CALL(*mock_power_library_, AddObserver(_)) | 341 EXPECT_CALL(*mock_power_library_, AddObserver(_)) |
| 344 .Times(1) | 342 .Times(1) |
| 345 .RetiresOnSaturation(); | 343 .RetiresOnSaturation(); |
| 346 EXPECT_CALL(*mock_power_library_, battery_fully_charged()) | 344 EXPECT_CALL(*mock_power_library_, battery_fully_charged()) |
| 347 .Times(1) | 345 .Times(1) |
| 348 .WillRepeatedly((Return(false))) | 346 .WillRepeatedly((Return(false))) |
| 349 .RetiresOnSaturation(); | 347 .RetiresOnSaturation(); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 test_api()->SetScreenLockLibrary(NULL, false); | 439 test_api()->SetScreenLockLibrary(NULL, false); |
| 442 if (mock_speech_synthesis_library_) | 440 if (mock_speech_synthesis_library_) |
| 443 test_api()->SetSpeechSynthesisLibrary(NULL, false); | 441 test_api()->SetSpeechSynthesisLibrary(NULL, false); |
| 444 if (mock_system_library_) | 442 if (mock_system_library_) |
| 445 test_api()->SetSystemLibrary(NULL, false); | 443 test_api()->SetSystemLibrary(NULL, false); |
| 446 if (mock_touchpad_library_) | 444 if (mock_touchpad_library_) |
| 447 test_api()->SetTouchpadLibrary(NULL, false); | 445 test_api()->SetTouchpadLibrary(NULL, false); |
| 448 } | 446 } |
| 449 | 447 |
| 450 } // namespace chromeos | 448 } // namespace chromeos |
| OLD | NEW |