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 | |
| 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H__ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H__ |
| 7 | |
| 8 | #include <gmock/gmock.h> |
| 9 | |
Andrew de los Reyes | 4516810 | 2010-11-22 11:13:50 -0800 | [diff] [blame] | 10 | #include "update_engine/mock_dbus_interface.h" |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 11 | #include "update_engine/mock_system_state.h" |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 12 | #include "update_engine/update_attempter.h" |
| 13 | |
| 14 | namespace chromeos_update_engine { |
| 15 | |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 16 | class MockSystemState; |
| 17 | |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 18 | class UpdateAttempterMock : public UpdateAttempter { |
| 19 | public: |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 20 | explicit UpdateAttempterMock(MockSystemState* mock_system_state, |
| 21 | MockDbusGlib* dbus) |
Gilad Arnold | bf7919b | 2013-01-08 13:07:37 -0800 | [diff] [blame] | 22 | : UpdateAttempter(mock_system_state, dbus) {} |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 23 | |
Gilad Arnold | b92f0df | 2013-01-10 16:32:45 -0800 | [diff] [blame] | 24 | MOCK_METHOD5(Update, void(const std::string& app_version, |
Andrew de los Reyes | 4516810 | 2010-11-22 11:13:50 -0800 | [diff] [blame] | 25 | const std::string& omaha_url, |
Andrew de los Reyes | fb2f461 | 2011-06-09 18:21:49 -0700 | [diff] [blame] | 26 | bool obey_proxies, |
Gilad Arnold | 1ebd813 | 2012-03-05 10:19:29 -0800 | [diff] [blame] | 27 | bool interactive, |
Gilad Arnold | b92f0df | 2013-01-10 16:32:45 -0800 | [diff] [blame] | 28 | bool is_test)); |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | } // namespace chromeos_update_engine |
| 32 | |
| 33 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H__ |