blob: ecda9a31ad7b919669e3ce431fb8bc3a4d78dd27 [file] [log] [blame]
Alex Deymo542c19b2015-12-03 07:43:31 -03001//
2// Copyright (C) 2015 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Amin Hassaniec7bc112020-10-29 16:47:58 -070017#ifndef UPDATE_ENGINE_COMMON_MOCK_DOWNLOAD_ACTION_H_
18#define UPDATE_ENGINE_COMMON_MOCK_DOWNLOAD_ACTION_H_
Alex Deymo542c19b2015-12-03 07:43:31 -030019
20#include <stdint.h>
21
22#include <gmock/gmock.h>
23
Amin Hassaniec7bc112020-10-29 16:47:58 -070024#include "update_engine/common/download_action.h"
Alex Deymo542c19b2015-12-03 07:43:31 -030025#include "update_engine/common/error_code.h"
Alex Deymo542c19b2015-12-03 07:43:31 -030026
27namespace chromeos_update_engine {
28
29class MockDownloadActionDelegate : public DownloadActionDelegate {
30 public:
31 MOCK_METHOD3(BytesReceived,
32 void(uint64_t bytes_progressed,
33 uint64_t bytes_received,
34 uint64_t total));
35 MOCK_METHOD1(ShouldCancel, bool(ErrorCode* cancel_reason));
36 MOCK_METHOD0(DownloadComplete, void());
37};
38
39} // namespace chromeos_update_engine
40
Amin Hassaniec7bc112020-10-29 16:47:58 -070041#endif // UPDATE_ENGINE_COMMON_MOCK_DOWNLOAD_ACTION_H_