| 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_ipconfig_client.h" | 8 #include "chromeos/dbus/shill_ipconfig_client.h" |
| 9 #include "dbus/message.h" | 9 #include "dbus/message.h" |
| 10 #include "dbus/values_util.h" | 10 #include "dbus/values_util.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 entry_writer.AppendString(shill::kMtuProperty); | 100 entry_writer.AppendString(shill::kMtuProperty); |
| 101 entry_writer.AppendVariantOfInt32(kMtu); | 101 entry_writer.AppendVariantOfInt32(kMtu); |
| 102 array_writer.CloseContainer(&entry_writer); | 102 array_writer.CloseContainer(&entry_writer); |
| 103 writer.CloseContainer(&array_writer); | 103 writer.CloseContainer(&array_writer); |
| 104 | 104 |
| 105 // Create the expected value. | 105 // Create the expected value. |
| 106 base::DictionaryValue value; | 106 base::DictionaryValue value; |
| 107 value.SetWithoutPathExpansion(shill::kAddressProperty, | 107 value.SetWithoutPathExpansion(shill::kAddressProperty, |
| 108 new base::StringValue(kAddress)); | 108 new base::StringValue(kAddress)); |
| 109 value.SetWithoutPathExpansion(shill::kMtuProperty, | 109 value.SetWithoutPathExpansion(shill::kMtuProperty, |
| 110 base::Value::CreateIntegerValue(kMtu)); | 110 new base::FundamentalValue(kMtu)); |
| 111 | 111 |
| 112 // Set expectations. | 112 // Set expectations. |
| 113 PrepareForMethodCall(shill::kGetPropertiesFunction, | 113 PrepareForMethodCall(shill::kGetPropertiesFunction, |
| 114 base::Bind(&ExpectNoArgument), | 114 base::Bind(&ExpectNoArgument), |
| 115 response.get()); | 115 response.get()); |
| 116 // Call method. | 116 // Call method. |
| 117 client_->GetProperties(dbus::ObjectPath(kExampleIPConfigPath), | 117 client_->GetProperties(dbus::ObjectPath(kExampleIPConfigPath), |
| 118 base::Bind(&ExpectDictionaryValueResult, &value)); | 118 base::Bind(&ExpectDictionaryValueResult, &value)); |
| 119 // Run the message loop. | 119 // Run the message loop. |
| 120 message_loop_.RunUntilIdle(); | 120 message_loop_.RunUntilIdle(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 response.get()); | 169 response.get()); |
| 170 // Call method. | 170 // Call method. |
| 171 client_->Remove(dbus::ObjectPath(kExampleIPConfigPath), | 171 client_->Remove(dbus::ObjectPath(kExampleIPConfigPath), |
| 172 base::Bind(&ExpectNoResultValue)); | 172 base::Bind(&ExpectNoResultValue)); |
| 173 | 173 |
| 174 // Run the message loop. | 174 // Run the message loop. |
| 175 message_loop_.RunUntilIdle(); | 175 message_loop_.RunUntilIdle(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace chromeos | 178 } // namespace chromeos |
| OLD | NEW |