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

Side by Side Diff: chromeos/dbus/modem_messaging_client_unittest.cc

Issue 15774005: chromeos: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/mock_cryptohome_client.cc ('k') | chromeos/dbus/power_manager_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chromeos/dbus/modem_messaging_client.h" 5 #include "chromeos/dbus/modem_messaging_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "dbus/message.h" 10 #include "dbus/message.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Checks the results of List. 131 // Checks the results of List.
132 void CheckResult(const std::vector<dbus::ObjectPath>& result) { 132 void CheckResult(const std::vector<dbus::ObjectPath>& result) {
133 EXPECT_EQ(result, *expected_result_); 133 EXPECT_EQ(result, *expected_result_);
134 } 134 }
135 135
136 protected: 136 protected:
137 // The client to be tested. 137 // The client to be tested.
138 scoped_ptr<ModemMessagingClient> client_; 138 scoped_ptr<ModemMessagingClient> client_;
139 // A message loop to emulate asynchronous behavior. 139 // A message loop to emulate asynchronous behavior.
140 MessageLoop message_loop_; 140 base::MessageLoop message_loop_;
141 // The mock bus. 141 // The mock bus.
142 scoped_refptr<dbus::MockBus> mock_bus_; 142 scoped_refptr<dbus::MockBus> mock_bus_;
143 // The mock object proxy. 143 // The mock object proxy.
144 scoped_refptr<dbus::MockObjectProxy> mock_proxy_; 144 scoped_refptr<dbus::MockObjectProxy> mock_proxy_;
145 // The SmsReceived signal handler given by the tested client. 145 // The SmsReceived signal handler given by the tested client.
146 dbus::ObjectProxy::SignalCallback sms_received_callback_; 146 dbus::ObjectProxy::SignalCallback sms_received_callback_;
147 // Expected argument for Delete method. 147 // Expected argument for Delete method.
148 dbus::ObjectPath expected_sms_path_; 148 dbus::ObjectPath expected_sms_path_;
149 // Response returned by mock methods. 149 // Response returned by mock methods.
150 dbus::Response* response_; 150 dbus::Response* response_;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Call List. 239 // Call List.
240 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), 240 client_->List(kServiceName, dbus::ObjectPath(kObjectPath),
241 base::Bind(&MockListCallback::Run, 241 base::Bind(&MockListCallback::Run,
242 base::Unretained(&callback))); 242 base::Unretained(&callback)));
243 243
244 // Run the message loop. 244 // Run the message loop.
245 message_loop_.RunUntilIdle(); 245 message_loop_.RunUntilIdle();
246 } 246 }
247 247
248 } // namespace chromeos 248 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/mock_cryptohome_client.cc ('k') | chromeos/dbus/power_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698