blob: c55492b48242bd75376d078ca595dd0f5d33f69f [file] [log] [blame]
Paul Stewartc2350ee2011-10-19 12:28:40 -07001// Copyright (c) 2011 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_EVENT_DISPATCHER_H_
6#define SHILL_MOCK_EVENT_DISPATCHER_H_
7
8#include <base/basictypes.h>
9#include <gmock/gmock.h>
10
11#include "shill/event_dispatcher.h"
12
13namespace shill {
14
15class MockEventDispatcher : public EventDispatcher {
16 public:
17 MockEventDispatcher();
18 virtual ~MockEventDispatcher();
19
20 MOCK_METHOD0(DispatchForever, void());
21 MOCK_METHOD0(DispatchPendingEvents, void());
Eric Shienbrood3e20a232012-02-16 11:35:56 -050022 MOCK_METHOD1(PostTask, bool(const base::Closure &task));
23 MOCK_METHOD2(PostDelayedTask, bool(const base::Closure &task,
24 int64 delay_ms));
Paul Stewartc2350ee2011-10-19 12:28:40 -070025 MOCK_METHOD2(CreateInputHandler,
Eric Shienbrood3e20a232012-02-16 11:35:56 -050026 IOHandler *(int fd,
27 const base::Callback<void(InputData *)> &callback));
Paul Stewartc2350ee2011-10-19 12:28:40 -070028
29 MOCK_METHOD3(CreateReadyHandler,
30 IOHandler *(int fd,
31 IOHandler::ReadyMode mode,
Eric Shienbrood3e20a232012-02-16 11:35:56 -050032 const base::Callback<void(int)> &callback));
Paul Stewartc2350ee2011-10-19 12:28:40 -070033
34 private:
35 DISALLOW_COPY_AND_ASSIGN(MockEventDispatcher);
36};
37
38} // namespace shill
39
40#endif // SHILL_MOCK_EVENT_DISPATCHER_H_