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

Unified Diff: dbus/mock_object_proxy.h

Issue 7714030: Add mock classes for Bus, ObjectProxy, and ExportedObject. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang build Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: dbus/mock_object_proxy.h
diff --git a/dbus/mock_object_proxy.h b/dbus/mock_object_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..b5d44777b7035cba9b8a0a3c638a92091002d121
--- /dev/null
+++ b/dbus/mock_object_proxy.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DBUS_MOCK_OBJECT_PROXY_H_
+#define DBUS_MOCK_OBJECT_PROXY_H_
+#pragma once
+
+#include <string>
+
+#include "dbus/object_proxy.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace dbus {
+
+// Mock for ObjectProxy.
+class MockObjectProxy : public ObjectProxy {
+ public:
+ MockObjectProxy(Bus* bus,
+ const std::string& service_name,
+ const std::string& object_path);
+ virtual ~MockObjectProxy();
+
+ MOCK_METHOD2(CallMethodAndBlock, Response*(MethodCall* method_call,
+ int timeout_ms));
+ MOCK_METHOD3(CallMethod, void(MethodCall* method_call,
+ int timeout_ms,
+ ResponseCallback callback));
+ MOCK_METHOD4(ConnectToSignal,
+ void(const std::string& interface_name,
+ const std::string& signal_name,
+ SignalCallback signal_callback,
+ OnConnectedCallback on_connected_callback));
+ MOCK_METHOD0(Detach, void());
+};
+
+} // namespace dbus
+
+#endif // DBUS_MOCK_OBJECT_PROXY_H_
« dbus/mock_bus.h ('K') | « dbus/mock_exported_object.cc ('k') | dbus/mock_object_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698