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

Side by Side Diff: chromeos/dbus/shill_client_unittest_base.h

Issue 10949030: This converts the Shill clients to allow propagation of shill errors (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review changes Created 8 years, 3 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 unified diff | Download patch
OLDNEW
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 CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ 5 #ifndef CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_
6 #define CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ 6 #define CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Expects the call status to be SUCCESS. 99 // Expects the call status to be SUCCESS.
100 static void ExpectNoResultValue(DBusMethodCallStatus call_status); 100 static void ExpectNoResultValue(DBusMethodCallStatus call_status);
101 101
102 // Checks the result and expects the call status to be SUCCESS. 102 // Checks the result and expects the call status to be SUCCESS.
103 static void ExpectObjectPathResult(const dbus::ObjectPath& expected_result, 103 static void ExpectObjectPathResult(const dbus::ObjectPath& expected_result,
104 DBusMethodCallStatus call_status, 104 DBusMethodCallStatus call_status,
105 const dbus::ObjectPath& result); 105 const dbus::ObjectPath& result);
106 106
107 // Checks the result and expects the call status to be SUCCESS. 107 // Checks the result and expects the call status to be SUCCESS.
108 static void ExpectObjectPathResultWithoutStatus(
109 const dbus::ObjectPath& expected_result,
110 const dbus::ObjectPath& result);
111
112 // Checks the result and expects the call status to be SUCCESS
hashimoto 2012/09/25 08:08:19 nit: Add period.
Greg Spencer (Chromium) 2012/09/25 18:40:08 Done.
108 static void ExpectDictionaryValueResult( 113 static void ExpectDictionaryValueResult(
109 const base::DictionaryValue* expected_result, 114 const base::DictionaryValue* expected_result,
110 DBusMethodCallStatus call_status, 115 DBusMethodCallStatus call_status,
111 const base::DictionaryValue& result); 116 const base::DictionaryValue& result);
112 117
118 // Expects the |expected_result| to match the |result|.
119 static void ExpectDictionaryValueResultWithoutStatus(
120 const base::DictionaryValue* expected_result,
121 const base::DictionaryValue& result);
122
113 // A message loop to emulate asynchronous behavior. 123 // A message loop to emulate asynchronous behavior.
114 MessageLoop message_loop_; 124 MessageLoop message_loop_;
115 // The mock bus. 125 // The mock bus.
116 scoped_refptr<dbus::MockBus> mock_bus_; 126 scoped_refptr<dbus::MockBus> mock_bus_;
117 127
118 private: 128 private:
119 // Checks the requested interface name and signal name. 129 // Checks the requested interface name and signal name.
120 // Used to implement the mock proxy. 130 // Used to implement the mock proxy.
121 void OnConnectToSignal( 131 void OnConnectToSignal(
122 const std::string& interface_name, 132 const std::string& interface_name,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 std::string expected_method_name_; 166 std::string expected_method_name_;
157 // The response which the mock object proxy returns. 167 // The response which the mock object proxy returns.
158 dbus::Response* response_; 168 dbus::Response* response_;
159 // A callback to intercept and check the method call arguments. 169 // A callback to intercept and check the method call arguments.
160 ArgumentCheckCallback argument_checker_; 170 ArgumentCheckCallback argument_checker_;
161 }; 171 };
162 172
163 } // namespace chromeos 173 } // namespace chromeos
164 174
165 #endif // CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ 175 #endif // CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698