Experimental push messaging api reference docs.
[chromium-blink-merge.git] / dbus / mock_object_proxy.h
blobe820f45a08b97517233b75f5b26a63622f0d914f
1 // Copyright (c) 2012 The Chromium 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.
5 #ifndef DBUS_MOCK_OBJECT_PROXY_H_
6 #define DBUS_MOCK_OBJECT_PROXY_H_
8 #include <string>
10 #include "dbus/object_path.h"
11 #include "dbus/object_proxy.h"
12 #include "testing/gmock/include/gmock/gmock.h"
14 namespace dbus {
16 // Mock for ObjectProxy.
17 class MockObjectProxy : public ObjectProxy {
18 public:
19 MockObjectProxy(Bus* bus,
20 const std::string& service_name,
21 const ObjectPath& object_path);
23 MOCK_METHOD2(CallMethodAndBlock, Response*(MethodCall* method_call,
24 int timeout_ms));
25 MOCK_METHOD3(CallMethod, void(MethodCall* method_call,
26 int timeout_ms,
27 ResponseCallback callback));
28 MOCK_METHOD4(CallMethodWithErrorCallback, void(MethodCall* method_call,
29 int timeout_ms,
30 ResponseCallback callback,
31 ErrorCallback error_callback));
32 MOCK_METHOD4(ConnectToSignal,
33 void(const std::string& interface_name,
34 const std::string& signal_name,
35 SignalCallback signal_callback,
36 OnConnectedCallback on_connected_callback));
37 MOCK_METHOD0(Detach, void());
39 protected:
40 virtual ~MockObjectProxy();
43 } // namespace dbus
45 #endif // DBUS_MOCK_OBJECT_PROXY_H_