OLD | NEW |
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_BUS_H_ | 5 #ifndef DBUS_MOCK_BUS_H_ |
6 #define DBUS_MOCK_BUS_H_ | 6 #define DBUS_MOCK_BUS_H_ |
7 | 7 |
8 #include "dbus/bus.h" | 8 #include "dbus/bus.h" |
9 #include "dbus/object_path.h" | 9 #include "dbus/object_path.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 ObjectProxy*(const std::string& service_name, | 24 ObjectProxy*(const std::string& service_name, |
25 const ObjectPath& object_path, | 25 const ObjectPath& object_path, |
26 int options)); | 26 int options)); |
27 MOCK_METHOD1(GetExportedObject, ExportedObject*( | 27 MOCK_METHOD1(GetExportedObject, ExportedObject*( |
28 const ObjectPath& object_path)); | 28 const ObjectPath& object_path)); |
29 MOCK_METHOD2(GetObjectManager, ObjectManager*(const std::string&, | 29 MOCK_METHOD2(GetObjectManager, ObjectManager*(const std::string&, |
30 const ObjectPath&)); | 30 const ObjectPath&)); |
31 MOCK_METHOD0(ShutdownAndBlock, void()); | 31 MOCK_METHOD0(ShutdownAndBlock, void()); |
32 MOCK_METHOD0(ShutdownOnDBusThreadAndBlock, void()); | 32 MOCK_METHOD0(ShutdownOnDBusThreadAndBlock, void()); |
33 MOCK_METHOD0(Connect, bool()); | 33 MOCK_METHOD0(Connect, bool()); |
34 MOCK_METHOD2(RequestOwnership, void( | 34 MOCK_METHOD3(RequestOwnership, void( |
35 const std::string& service_name, | 35 const std::string& service_name, |
| 36 ServiceOwnershipOptions options, |
36 OnOwnershipCallback on_ownership_callback)); | 37 OnOwnershipCallback on_ownership_callback)); |
37 MOCK_METHOD1(RequestOwnershipAndBlock, bool(const std::string& service_name)); | 38 MOCK_METHOD2(RequestOwnershipAndBlock, bool(const std::string& service_name, |
| 39 ServiceOwnershipOptions options)); |
38 MOCK_METHOD1(ReleaseOwnership, bool(const std::string& service_name)); | 40 MOCK_METHOD1(ReleaseOwnership, bool(const std::string& service_name)); |
39 MOCK_METHOD0(SetUpAsyncOperations, bool()); | 41 MOCK_METHOD0(SetUpAsyncOperations, bool()); |
40 MOCK_METHOD3(SendWithReplyAndBlock, DBusMessage*(DBusMessage* request, | 42 MOCK_METHOD3(SendWithReplyAndBlock, DBusMessage*(DBusMessage* request, |
41 int timeout_ms, | 43 int timeout_ms, |
42 DBusError* error)); | 44 DBusError* error)); |
43 MOCK_METHOD3(SendWithReply, void(DBusMessage* request, | 45 MOCK_METHOD3(SendWithReply, void(DBusMessage* request, |
44 DBusPendingCall** pending_call, | 46 DBusPendingCall** pending_call, |
45 int timeout_ms)); | 47 int timeout_ms)); |
46 MOCK_METHOD2(Send, void(DBusMessage* request, | 48 MOCK_METHOD2(Send, void(DBusMessage* request, |
47 uint32* serial)); | 49 uint32* serial)); |
(...skipping 24 matching lines...) Expand all Loading... |
72 MOCK_METHOD0(AssertOnOriginThread, void()); | 74 MOCK_METHOD0(AssertOnOriginThread, void()); |
73 MOCK_METHOD0(AssertOnDBusThread, void()); | 75 MOCK_METHOD0(AssertOnDBusThread, void()); |
74 | 76 |
75 protected: | 77 protected: |
76 virtual ~MockBus(); | 78 virtual ~MockBus(); |
77 }; | 79 }; |
78 | 80 |
79 } // namespace dbus | 81 } // namespace dbus |
80 | 82 |
81 #endif // DBUS_MOCK_BUS_H_ | 83 #endif // DBUS_MOCK_BUS_H_ |
OLD | NEW |