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

Side by Side Diff: chromeos/dbus/gsm_sms_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
« no previous file with comments | « chromeos/dbus/fake_shill_service_client.cc ('k') | chromeos/dbus/shill_client_unittest_base.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/gsm_sms_client.h" 5 #include "chromeos/dbus/gsm_sms_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 entry_writer.AppendVariantOfString(kExampleNumber); 249 entry_writer.AppendVariantOfString(kExampleNumber);
250 array_writer.CloseContainer(&entry_writer); 250 array_writer.CloseContainer(&entry_writer);
251 array_writer.OpenDictEntry(&entry_writer); 251 array_writer.OpenDictEntry(&entry_writer);
252 entry_writer.AppendString(kTextKey); 252 entry_writer.AppendString(kTextKey);
253 entry_writer.AppendVariantOfString(kExampleText); 253 entry_writer.AppendVariantOfString(kExampleText);
254 array_writer.CloseContainer(&entry_writer); 254 array_writer.CloseContainer(&entry_writer);
255 writer.CloseContainer(&array_writer); 255 writer.CloseContainer(&array_writer);
256 response_ = response.get(); 256 response_ = response.get();
257 // Create expected result. 257 // Create expected result.
258 base::DictionaryValue expected_result; 258 base::DictionaryValue expected_result;
259 expected_result.SetWithoutPathExpansion( 259 expected_result.SetWithoutPathExpansion(kNumberKey,
260 kNumberKey, new base::StringValue(kExampleNumber)); 260 new base::Value(kExampleNumber));
261 expected_result.SetWithoutPathExpansion(kTextKey, 261 expected_result.SetWithoutPathExpansion(kTextKey,
262 new base::StringValue(kExampleText)); 262 new base::Value(kExampleText));
263 expected_result_ = &expected_result; 263 expected_result_ = &expected_result;
264 // Call Get. 264 // Call Get.
265 client_->Get(kServiceName, dbus::ObjectPath(kObjectPath), kIndex, 265 client_->Get(kServiceName, dbus::ObjectPath(kObjectPath), kIndex,
266 callback.Get()); 266 callback.Get());
267 267
268 // Run the message loop. 268 // Run the message loop.
269 base::RunLoop().RunUntilIdle(); 269 base::RunLoop().RunUntilIdle();
270 } 270 }
271 271
272 TEST_F(GsmSMSClientTest, List) { 272 TEST_F(GsmSMSClientTest, List) {
(...skipping 18 matching lines...) Expand all
291 sub_array_writer.OpenDictEntry(&entry_writer); 291 sub_array_writer.OpenDictEntry(&entry_writer);
292 entry_writer.AppendString(kTextKey); 292 entry_writer.AppendString(kTextKey);
293 entry_writer.AppendVariantOfString(kExampleText); 293 entry_writer.AppendVariantOfString(kExampleText);
294 sub_array_writer.CloseContainer(&entry_writer); 294 sub_array_writer.CloseContainer(&entry_writer);
295 array_writer.CloseContainer(&sub_array_writer); 295 array_writer.CloseContainer(&sub_array_writer);
296 writer.CloseContainer(&array_writer); 296 writer.CloseContainer(&array_writer);
297 response_ = response.get(); 297 response_ = response.get();
298 // Create expected result. 298 // Create expected result.
299 base::ListValue expected_result; 299 base::ListValue expected_result;
300 auto sms = base::MakeUnique<base::DictionaryValue>(); 300 auto sms = base::MakeUnique<base::DictionaryValue>();
301 sms->SetWithoutPathExpansion(kNumberKey, 301 sms->SetWithoutPathExpansion(kNumberKey, new base::Value(kExampleNumber));
302 new base::StringValue(kExampleNumber)); 302 sms->SetWithoutPathExpansion(kTextKey, new base::Value(kExampleText));
303 sms->SetWithoutPathExpansion(kTextKey, new base::StringValue(kExampleText));
304 expected_result.Append(std::move(sms)); 303 expected_result.Append(std::move(sms));
305 expected_result_ = &expected_result; 304 expected_result_ = &expected_result;
306 // Call List. 305 // Call List.
307 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), callback.Get()); 306 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), callback.Get());
308 307
309 // Run the message loop. 308 // Run the message loop.
310 base::RunLoop().RunUntilIdle(); 309 base::RunLoop().RunUntilIdle();
311 } 310 }
312 311
313 } // namespace chromeos 312 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_service_client.cc ('k') | chromeos/dbus/shill_client_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698