blob: d2bc4474b1394826a157538f7bc36b1256b4ec46 [file] [log] [blame]
Darin Petkov1023a602010-08-30 13:47:51 -07001// 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 Deymo759c2752014-03-17 21:09:36 -07005#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_
Darin Petkov1023a602010-08-30 13:47:51 -07007
Darin Petkov1023a602010-08-30 13:47:51 -07008#include "update_engine/update_attempter.h"
9
Gilad Arnold76b2b482014-04-01 13:32:43 -070010#include <gmock/gmock.h>
11
Darin Petkov1023a602010-08-30 13:47:51 -070012namespace chromeos_update_engine {
13
14class UpdateAttempterMock : public UpdateAttempter {
15 public:
Gilad Arnold76b2b482014-04-01 13:32:43 -070016 using UpdateAttempter::UpdateAttempter;
Darin Petkov1023a602010-08-30 13:47:51 -070017
Gilad Arnoldb92f0df2013-01-10 16:32:45 -080018 MOCK_METHOD5(Update, void(const std::string& app_version,
Andrew de los Reyes45168102010-11-22 11:13:50 -080019 const std::string& omaha_url,
Andrew de los Reyesfb2f4612011-06-09 18:21:49 -070020 bool obey_proxies,
Gilad Arnold1ebd8132012-03-05 10:19:29 -080021 bool interactive,
Gilad Arnoldb92f0df2013-01-10 16:32:45 -080022 bool is_test));
Gilad Arnold76b2b482014-04-01 13:32:43 -070023
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 Arnolda6dab942014-04-25 11:46:03 -070031
32 MOCK_CONST_METHOD0(consecutive_failed_update_checks, unsigned int(void));
Darin Petkov1023a602010-08-30 13:47:51 -070033};
34
35} // namespace chromeos_update_engine
36
Alex Deymo759c2752014-03-17 21:09:36 -070037#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_ATTEMPTER_MOCK_H_