blob: 6c2d48620d890805e6dd143202ebcd227fe1218b [file] [log] [blame]
Paul Stewarte6927402012-01-23 16:11:30 -08001// Copyright (c) 2012 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 SHILL_MOCK_HTTP_REQUEST_H_
6#define SHILL_MOCK_HTTP_REQUEST_H_
7
8#include <base/basictypes.h>
9#include <gmock/gmock.h>
10
11#include "shill/http_request.h"
12#include "shill/http_url.h" // MOCK_METHOD3() call below needs sizeof(HTTPURL).
13
14namespace shill {
15
16class MockHTTPRequest : public HTTPRequest {
17 public:
18 MockHTTPRequest(ConnectionRefPtr connection);
19 virtual ~MockHTTPRequest();
20
21 MOCK_METHOD3(Start, HTTPRequest::Result(
22 const HTTPURL &url,
Eric Shienbrood3e20a232012-02-16 11:35:56 -050023 const base::Callback<void(const ByteString &)> &read_event_callback,
24 const base::Callback<void(Result, const ByteString &)> &result_callback));
Paul Stewarte6927402012-01-23 16:11:30 -080025 MOCK_METHOD0(Stop, void());
26 MOCK_CONST_METHOD0(response_data, const ByteString &());
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(MockHTTPRequest);
30};
31
32} // namespace shill
33
34#endif // SHILL_MOCK_HTTP_REQUEST_H_