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" |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 11 | #include "update_engine/update_attempter.h" |
| 12 | |
| 13 | namespace chromeos_update_engine { |
| 14 | |
| 15 | class UpdateAttempterMock : public UpdateAttempter { |
| 16 | public: |
Andrew de los Reyes | 000d895 | 2011-03-02 15:21:14 -0800 | [diff] [blame] | 17 | explicit UpdateAttempterMock(MockDbusGlib* dbus) |
Jay Srinivasan | 08fce04 | 2012-06-07 16:31:01 -0700 | [diff] [blame] | 18 | : UpdateAttempter(NULL, NULL, dbus, NULL, NULL) {} |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 19 | |
Jay Srinivasan | 08fce04 | 2012-06-07 16:31:01 -0700 | [diff] [blame] | 20 | MOCK_METHOD6(Update, void(const std::string& app_version, |
Andrew de los Reyes | 4516810 | 2010-11-22 11:13:50 -0800 | [diff] [blame] | 21 | const std::string& omaha_url, |
Andrew de los Reyes | fb2f461 | 2011-06-09 18:21:49 -0700 | [diff] [blame] | 22 | bool obey_proxies, |
Gilad Arnold | 1ebd813 | 2012-03-05 10:19:29 -0800 | [diff] [blame] | 23 | bool interactive, |
Jay Srinivasan | 08fce04 | 2012-06-07 16:31:01 -0700 | [diff] [blame] | 24 | bool is_test, |
| 25 | bool is_user_initiated)); |
Darin Petkov | 1023a60 | 2010-08-30 13:47:51 -0700 | [diff] [blame] | 26 | }; |
| 27 | |
| 28 | } // namespace chromeos_update_engine |
| 29 | |
| 30 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H__ |