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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus_interface.h ('k') | proxy_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mock_dbus_interface.h
diff --git a/mock_dbus_interface.h b/mock_dbus_interface.h
index bf0d60960919ae2c559bcfa47d6cb652fbc8f568..c8171097f47793d67c13c79eeb21ac04448d50ad 100644
--- a/mock_dbus_interface.h
+++ b/mock_dbus_interface.h
@@ -30,6 +30,34 @@ class MockDbusGlib : public DbusGlibInterface {
GType var_arg1,
GHashTable** var_arg2,
GType var_arg3));
+ MOCK_METHOD10(ProxyCall, gboolean(DBusGProxy* proxy,
+ const char* method,
+ GError** error,
+ GType var_arg1, const char* var_arg2,
+ GType var_arg3,
+ GType var_arg4, gchar** var_arg5,
+ GType var_arg6, GArray** var_arg7));
+
+ // Since gmock only supports mocking functions up to 10 args, we
+ // take the 11-arg function we'd like to mock, drop the last arg
+ // and call the 10-arg version. Dropping the last arg isn't ideal,
+ // but this is a lot better than nothing.
+ gboolean ProxyCall(DBusGProxy* proxy,
+ const char* method,
+ GError** error,
+ GType var_arg1, const char* var_arg2,
+ GType var_arg3,
+ GType var_arg4, gchar** var_arg5,
+ GType var_arg6, GArray** var_arg7,
+ GType var_arg8) {
+ return ProxyCall(proxy,
+ method,
+ error,
+ var_arg1, var_arg2,
+ var_arg3,
+ var_arg4, var_arg5,
+ var_arg6, var_arg7);
+ }
};
} // namespace chromeos_update_engine
« 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