OLD | NEW |
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 "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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 response_ = response.get(); | 305 response_ = response.get(); |
306 // Create expected result. | 306 // Create expected result. |
307 base::ListValue expected_result; | 307 base::ListValue expected_result; |
308 base::DictionaryValue* sms = new base::DictionaryValue; | 308 base::DictionaryValue* sms = new base::DictionaryValue; |
309 sms->SetWithoutPathExpansion( | 309 sms->SetWithoutPathExpansion( |
310 kNumberKey, base::Value::CreateStringValue(kExampleNumber)); | 310 kNumberKey, base::Value::CreateStringValue(kExampleNumber)); |
311 sms->SetWithoutPathExpansion( | 311 sms->SetWithoutPathExpansion( |
312 kTextKey, base::Value::CreateStringValue(kExampleText)); | 312 kTextKey, base::Value::CreateStringValue(kExampleText)); |
313 expected_result.Append(sms); | 313 expected_result.Append(sms); |
314 expected_result_ = &expected_result; | 314 expected_result_ = &expected_result; |
315 // Call Delete. | 315 // Call List. |
316 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), | 316 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), |
317 base::Bind(&MockListCallback::Run, | 317 base::Bind(&MockListCallback::Run, |
318 base::Unretained(&callback))); | 318 base::Unretained(&callback))); |
319 | 319 |
320 // Run the message loop. | 320 // Run the message loop. |
321 message_loop_.RunAllPending(); | 321 message_loop_.RunAllPending(); |
322 } | 322 } |
323 | 323 |
324 } // namespace chromeos | 324 } // namespace chromeos |
OLD | NEW |