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

Side by Side Diff: mock_dbus_interface.h

Issue 5151005: AU: Proxy Resolver classes (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: merge master Created 10 years, 1 month 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 | « dbus_interface.h ('k') | proxy_resolver.h » ('j') | 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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__
7 7
8 #include <gmock/gmock.h> 8 #include <gmock/gmock.h>
9 9
10 #include "update_engine/dbus_interface.h" 10 #include "update_engine/dbus_interface.h"
(...skipping 12 matching lines...) Expand all
23 23
24 MOCK_METHOD2(BusGet, DBusGConnection*(DBusBusType type, GError **error)); 24 MOCK_METHOD2(BusGet, DBusGConnection*(DBusBusType type, GError **error));
25 25
26 MOCK_METHOD7(ProxyCall, gboolean(DBusGProxy *proxy, 26 MOCK_METHOD7(ProxyCall, gboolean(DBusGProxy *proxy,
27 const char *method, 27 const char *method,
28 GError **error, 28 GError **error,
29 GType first_arg_type, 29 GType first_arg_type,
30 GType var_arg1, 30 GType var_arg1,
31 GHashTable** var_arg2, 31 GHashTable** var_arg2,
32 GType var_arg3)); 32 GType var_arg3));
33 MOCK_METHOD10(ProxyCall, gboolean(DBusGProxy* proxy,
34 const char* method,
35 GError** error,
36 GType var_arg1, const char* var_arg2,
37 GType var_arg3,
38 GType var_arg4, gchar** var_arg5,
39 GType var_arg6, GArray** var_arg7));
40
41 // Since gmock only supports mocking functions up to 10 args, we
42 // take the 11-arg function we'd like to mock, drop the last arg
43 // and call the 10-arg version. Dropping the last arg isn't ideal,
44 // but this is a lot better than nothing.
45 gboolean ProxyCall(DBusGProxy* proxy,
46 const char* method,
47 GError** error,
48 GType var_arg1, const char* var_arg2,
49 GType var_arg3,
50 GType var_arg4, gchar** var_arg5,
51 GType var_arg6, GArray** var_arg7,
52 GType var_arg8) {
53 return ProxyCall(proxy,
54 method,
55 error,
56 var_arg1, var_arg2,
57 var_arg3,
58 var_arg4, var_arg5,
59 var_arg6, var_arg7);
60 }
33 }; 61 };
34 62
35 } // namespace chromeos_update_engine 63 } // namespace chromeos_update_engine
36 64
37 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__ 65 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__
OLDNEW
« no previous file with comments | « dbus_interface.h ('k') | proxy_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698