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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 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 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/test/mock_callback.h" 7 #include "base/test/mock_callback.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/dbus/shill_client_unittest_base.h" 9 #include "chromeos/dbus/shill_client_unittest_base.h"
10 #include "chromeos/dbus/shill_service_client.h" 10 #include "chromeos/dbus/shill_service_client.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Run the message loop. 110 // Run the message loop.
111 base::RunLoop().RunUntilIdle(); 111 base::RunLoop().RunUntilIdle();
112 } 112 }
113 113
114 TEST_F(ShillServiceClientTest, SetProperty) { 114 TEST_F(ShillServiceClientTest, SetProperty) {
115 const char kValue[] = "passphrase"; 115 const char kValue[] = "passphrase";
116 // Create response. 116 // Create response.
117 std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); 117 std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
118 118
119 // Set expectations. 119 // Set expectations.
120 const base::StringValue value(kValue); 120 const base::Value value(kValue);
121 PrepareForMethodCall(shill::kSetPropertyFunction, 121 PrepareForMethodCall(shill::kSetPropertyFunction,
122 base::Bind(&ExpectStringAndValueArguments, 122 base::Bind(&ExpectStringAndValueArguments,
123 shill::kPassphraseProperty, 123 shill::kPassphraseProperty,
124 &value), 124 &value),
125 response.get()); 125 response.get());
126 // Call method. 126 // Call method.
127 base::MockCallback<base::Closure> mock_closure; 127 base::MockCallback<base::Closure> mock_closure;
128 base::MockCallback<ShillServiceClient::ErrorCallback> mock_error_callback; 128 base::MockCallback<ShillServiceClient::ErrorCallback> mock_error_callback;
129 client_->SetProperty(dbus::ObjectPath(kExampleServicePath), 129 client_->SetProperty(dbus::ObjectPath(kExampleServicePath),
130 shill::kPassphraseProperty, value, mock_closure.Get(), 130 shill::kPassphraseProperty, value, mock_closure.Get(),
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 kCarrier, mock_closure.Get(), 289 kCarrier, mock_closure.Get(),
290 mock_error_callback.Get()); 290 mock_error_callback.Get());
291 EXPECT_CALL(mock_closure, Run()).Times(1); 291 EXPECT_CALL(mock_closure, Run()).Times(1);
292 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); 292 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
293 293
294 // Run the message loop. 294 // Run the message loop.
295 base::RunLoop().RunUntilIdle(); 295 base::RunLoop().RunUntilIdle();
296 } 296 }
297 297
298 } // namespace chromeos 298 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_profile_client_unittest.cc ('k') | chromeos/network/client_cert_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698