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

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

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 7 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(kNumberKey, 259 expected_result.SetStringWithoutPathExpansion(kNumberKey, kExampleNumber);
260 new base::Value(kExampleNumber)); 260 expected_result.SetStringWithoutPathExpansion(kTextKey, kExampleText);
261 expected_result.SetWithoutPathExpansion(kTextKey,
262 new base::Value(kExampleText));
263 expected_result_ = &expected_result; 261 expected_result_ = &expected_result;
264 // Call Get. 262 // Call Get.
265 client_->Get(kServiceName, dbus::ObjectPath(kObjectPath), kIndex, 263 client_->Get(kServiceName, dbus::ObjectPath(kObjectPath), kIndex,
266 callback.Get()); 264 callback.Get());
267 265
268 // Run the message loop. 266 // Run the message loop.
269 base::RunLoop().RunUntilIdle(); 267 base::RunLoop().RunUntilIdle();
270 } 268 }
271 269
272 TEST_F(GsmSMSClientTest, List) { 270 TEST_F(GsmSMSClientTest, List) {
(...skipping 18 matching lines...) Expand all
291 sub_array_writer.OpenDictEntry(&entry_writer); 289 sub_array_writer.OpenDictEntry(&entry_writer);
292 entry_writer.AppendString(kTextKey); 290 entry_writer.AppendString(kTextKey);
293 entry_writer.AppendVariantOfString(kExampleText); 291 entry_writer.AppendVariantOfString(kExampleText);
294 sub_array_writer.CloseContainer(&entry_writer); 292 sub_array_writer.CloseContainer(&entry_writer);
295 array_writer.CloseContainer(&sub_array_writer); 293 array_writer.CloseContainer(&sub_array_writer);
296 writer.CloseContainer(&array_writer); 294 writer.CloseContainer(&array_writer);
297 response_ = response.get(); 295 response_ = response.get();
298 // Create expected result. 296 // Create expected result.
299 base::ListValue expected_result; 297 base::ListValue expected_result;
300 auto sms = base::MakeUnique<base::DictionaryValue>(); 298 auto sms = base::MakeUnique<base::DictionaryValue>();
301 sms->SetWithoutPathExpansion(kNumberKey, new base::Value(kExampleNumber)); 299 sms->SetStringWithoutPathExpansion(kNumberKey, kExampleNumber);
302 sms->SetWithoutPathExpansion(kTextKey, new base::Value(kExampleText)); 300 sms->SetStringWithoutPathExpansion(kTextKey, kExampleText);
303 expected_result.Append(std::move(sms)); 301 expected_result.Append(std::move(sms));
304 expected_result_ = &expected_result; 302 expected_result_ = &expected_result;
305 // Call List. 303 // Call List.
306 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), callback.Get()); 304 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), callback.Get());
307 305
308 // Run the message loop. 306 // Run the message loop.
309 base::RunLoop().RunUntilIdle(); 307 base::RunLoop().RunUntilIdle();
310 } 308 }
311 309
312 } // namespace chromeos 310 } // 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