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

Unified Diff: dbus/mock_object_manager.h

Issue 12491014: Support D-Bus Object Manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Insufficient entrails in my offering Created 7 years, 9 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
« no previous file with comments | « dbus/mock_bus.h ('k') | dbus/mock_object_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/mock_object_manager.h
diff --git a/dbus/mock_object_manager.h b/dbus/mock_object_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4c76ba71144c781b7f00429d62ed39d2598dc4f
--- /dev/null
+++ b/dbus/mock_object_manager.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2013 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_MANAGER_H_
+#define DBUS_MOCK_OBJECT_MANAGER_H_
+
+#include <string>
+
+#include "dbus/message.h"
+#include "dbus/object_manager.h"
+#include "dbus/object_path.h"
+#include "dbus/object_proxy.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace dbus {
+
+// Mock for ObjectManager.
+class MockObjectManager : public ObjectManager {
+ public:
+ MockObjectManager(Bus* bus,
+ const std::string& service_name,
+ const ObjectPath& object_path);
+
+ MOCK_METHOD2(RegisterInterface, void(const std::string&,
+ Interface*));
+ MOCK_METHOD1(UnregisterInterface, void(const std::string&));
+ MOCK_METHOD0(GetObjects, std::vector<ObjectPath>());
+ MOCK_METHOD1(GetObjectsWithInterface,
+ std::vector<ObjectPath>(const std::string&));
+ MOCK_METHOD1(GetObjectProxy, ObjectProxy*(const ObjectPath&));
+ MOCK_METHOD2(GetProperties, PropertySet*(const ObjectPath&,
+ const std::string&));
+ MOCK_METHOD0(GetManagedObjects, void());
+
+ protected:
+ virtual ~MockObjectManager();
+};
+
+} // namespace dbus
+
+#endif // DBUS_MOCK_OBJECT_MANAGER_H_
« no previous file with comments | « dbus/mock_bus.h ('k') | dbus/mock_object_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698