| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/values.h" | 6 #include "base/values.h" |
| 7 #include "chromeos/dbus/shill_client_unittest_base.h" | 7 #include "chromeos/dbus/shill_client_unittest_base.h" |
| 8 #include "chromeos/dbus/shill_manager_client.h" | 8 #include "chromeos/dbus/shill_manager_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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 type_dict_writer.CloseContainer(&type_entry_writer); | 158 type_dict_writer.CloseContainer(&type_entry_writer); |
| 159 writer.CloseContainer(&type_dict_writer); | 159 writer.CloseContainer(&type_dict_writer); |
| 160 | 160 |
| 161 | 161 |
| 162 // Create the expected value. | 162 // Create the expected value. |
| 163 base::DictionaryValue type_dict_value; | 163 base::DictionaryValue type_dict_value; |
| 164 base::ListValue* type_entry_value = new base::ListValue; | 164 base::ListValue* type_entry_value = new base::ListValue; |
| 165 base::DictionaryValue* property_dict_value = new base::DictionaryValue; | 165 base::DictionaryValue* property_dict_value = new base::DictionaryValue; |
| 166 property_dict_value->SetWithoutPathExpansion( | 166 property_dict_value->SetWithoutPathExpansion( |
| 167 shill::kGeoMacAddressProperty, | 167 shill::kGeoMacAddressProperty, |
| 168 base::Value::CreateStringValue("01:23:45:67:89:AB")); | 168 new base::StringValue("01:23:45:67:89:AB")); |
| 169 type_entry_value->Append(property_dict_value); | 169 type_entry_value->Append(property_dict_value); |
| 170 type_dict_value.SetWithoutPathExpansion("wifi", type_entry_value); | 170 type_dict_value.SetWithoutPathExpansion("wifi", type_entry_value); |
| 171 | 171 |
| 172 // Set expectations. | 172 // Set expectations. |
| 173 PrepareForMethodCall(shill::kGetNetworksForGeolocation, | 173 PrepareForMethodCall(shill::kGetNetworksForGeolocation, |
| 174 base::Bind(&ExpectNoArgument), | 174 base::Bind(&ExpectNoArgument), |
| 175 response.get()); | 175 response.get()); |
| 176 // Call method. | 176 // Call method. |
| 177 client_->GetNetworksForGeolocation(base::Bind(&ExpectDictionaryValueResult, | 177 client_->GetNetworksForGeolocation(base::Bind(&ExpectDictionaryValueResult, |
| 178 &type_dict_value)); | 178 &type_dict_value)); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 arguments[7], | 431 arguments[7], |
| 432 base::Bind(&ExpectStringResultWithoutStatus, expected), | 432 base::Bind(&ExpectStringResultWithoutStatus, expected), |
| 433 mock_error_callback.GetCallback()); | 433 mock_error_callback.GetCallback()); |
| 434 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); | 434 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); |
| 435 | 435 |
| 436 // Run the message loop. | 436 // Run the message loop. |
| 437 message_loop_.RunUntilIdle(); | 437 message_loop_.RunUntilIdle(); |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace chromeos | 440 } // namespace chromeos |
| OLD | NEW |