Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame] | 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_ |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 7 | |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 8 | #include "update_engine/update_attempter.h" |
| 9 | |
Gilad Arnold | 76b2b48 | 2014-04-01 13:32:43 -0700 | [diff] [blame] | 10 | #include <gmock/gmock.h> |
| 11 | |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 12 | namespace chromeos_update_engine { |
| 13 | |
| 14 | class UpdateAttempterMock : public UpdateAttempter { |
| 15 | public: |
Gilad Arnold | 76b2b48 | 2014-04-01 13:32:43 -0700 | [diff] [blame] | 16 | using UpdateAttempter::UpdateAttempter; |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 17 | |
Gilad Arnold | b92f0df | 2013-01-10 16:32:45 -0800 | [diff] [blame] | 18 | MOCK_METHOD5(Update, void(const std::string& app_version, |
Andrew de los Reyes | 4516810 | 2010-11-22 11:13:50 -0800 | [diff] [blame] | 19 | const std::string& omaha_url, |
Andrew de los Reyes | fb2f461 | 2011-06-09 18:21:49 -0700 | [diff] [blame] | 20 | bool obey_proxies, |
Gilad Arnold | 1ebd813 | 2012-03-05 10:19:29 -0800 | [diff] [blame] | 21 | bool interactive, |
Gilad Arnold | b92f0df | 2013-01-10 16:32:45 -0800 | [diff] [blame] | 22 | bool is_test)); |
Gilad Arnold | 76b2b48 | 2014-04-01 13:32:43 -0700 | [diff] [blame] | 23 | |
| 24 | MOCK_METHOD5(GetStatus, bool(int64_t* last_checked_time, |
| 25 | double* progress, |
| 26 | std::string* current_operation, |
| 27 | std::string* new_version, |
| 28 | int64_t* new_size)); |
| 29 | |
| 30 | MOCK_METHOD1(GetBootTimeAtUpdate, bool(base::Time* out_boot_time)); |
Gilad Arnold | a6dab94 | 2014-04-25 11:46:03 -0700 | [diff] [blame^] | 31 | |
| 32 | MOCK_CONST_METHOD0(consecutive_failed_update_checks, unsigned int(void)); |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | } // namespace chromeos_update_engine |
| 36 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame] | 37 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_ |