Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: dbus/mock_object_proxy.h

Issue 10168027: Add MockObjectProxy::CallMethodWithErrorCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DBUS_MOCK_OBJECT_PROXY_H_ 5 #ifndef DBUS_MOCK_OBJECT_PROXY_H_
6 #define DBUS_MOCK_OBJECT_PROXY_H_ 6 #define DBUS_MOCK_OBJECT_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "dbus/object_path.h" 11 #include "dbus/object_path.h"
12 #include "dbus/object_proxy.h" 12 #include "dbus/object_proxy.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 14
15 namespace dbus { 15 namespace dbus {
16 16
17 // Mock for ObjectProxy. 17 // Mock for ObjectProxy.
18 class MockObjectProxy : public ObjectProxy { 18 class MockObjectProxy : public ObjectProxy {
19 public: 19 public:
20 MockObjectProxy(Bus* bus, 20 MockObjectProxy(Bus* bus,
21 const std::string& service_name, 21 const std::string& service_name,
22 const ObjectPath& object_path); 22 const ObjectPath& object_path);
23 virtual ~MockObjectProxy(); 23 virtual ~MockObjectProxy();
24 24
25 MOCK_METHOD2(CallMethodAndBlock, Response*(MethodCall* method_call, 25 MOCK_METHOD2(CallMethodAndBlock, Response*(MethodCall* method_call,
26 int timeout_ms)); 26 int timeout_ms));
27 MOCK_METHOD3(CallMethod, void(MethodCall* method_call, 27 MOCK_METHOD3(CallMethod, void(MethodCall* method_call,
28 int timeout_ms, 28 int timeout_ms,
29 ResponseCallback callback)); 29 ResponseCallback callback));
30 MOCK_METHOD4(CallMethodWithErrorCallback, void(MethodCall* method_call,
31 int timeout_ms,
32 ResponseCallback callback,
33 ErrorCallback error_callback));
30 MOCK_METHOD4(ConnectToSignal, 34 MOCK_METHOD4(ConnectToSignal,
31 void(const std::string& interface_name, 35 void(const std::string& interface_name,
32 const std::string& signal_name, 36 const std::string& signal_name,
33 SignalCallback signal_callback, 37 SignalCallback signal_callback,
34 OnConnectedCallback on_connected_callback)); 38 OnConnectedCallback on_connected_callback));
35 MOCK_METHOD0(Detach, void()); 39 MOCK_METHOD0(Detach, void());
36 }; 40 };
37 41
38 } // namespace dbus 42 } // namespace dbus
39 43
40 #endif // DBUS_MOCK_OBJECT_PROXY_H_ 44 #endif // DBUS_MOCK_OBJECT_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698