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

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

Issue 10134028: Reimplement ActivateCellularModem without Libcros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add crosbug.com URLs to TODO comments Created 8 years, 8 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/flimflam_service_client.cc ('k') | chromeos/dbus/mock_flimflam_service_client.h » ('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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chromeos/dbus/flimflam_client_unittest_base.h" 7 #include "chromeos/dbus/flimflam_client_unittest_base.h"
8 #include "chromeos/dbus/flimflam_service_client.h" 8 #include "chromeos/dbus/flimflam_service_client.h"
9 #include "dbus/message.h" 9 #include "dbus/message.h"
10 #include "dbus/object_path.h" 10 #include "dbus/object_path.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 base::Bind(&ExpectStringArgument, kCarrier), 193 base::Bind(&ExpectStringArgument, kCarrier),
194 response.get()); 194 response.get());
195 // Call method. 195 // Call method.
196 client_->ActivateCellularModem(dbus::ObjectPath(kExampleServicePath), 196 client_->ActivateCellularModem(dbus::ObjectPath(kExampleServicePath),
197 kCarrier, 197 kCarrier,
198 base::Bind(&ExpectNoResultValue)); 198 base::Bind(&ExpectNoResultValue));
199 // Run the message loop. 199 // Run the message loop.
200 message_loop_.RunAllPending(); 200 message_loop_.RunAllPending();
201 } 201 }
202 202
203 TEST_F(FlimflamServiceClientTest, CallActivateCellularModemAndBlock) {
204 const char kCarrier[] = "carrier";
205 // Create response.
206 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
207
208 // Set expectations.
209 PrepareForMethodCall(flimflam::kActivateCellularModemFunction,
210 base::Bind(&ExpectStringArgument, kCarrier),
211 response.get());
212 // Call method.
213 const bool result = client_->CallActivateCellularModemAndBlock(
214 dbus::ObjectPath(kExampleServicePath), kCarrier);
215 EXPECT_TRUE(result);
216 }
217
203 } // namespace chromeos 218 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/flimflam_service_client.cc ('k') | chromeos/dbus/mock_flimflam_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698