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_device_client.h" | 8 #include "chromeos/dbus/shill_device_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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 dbus::MessageWriter entry_writer(NULL); | 120 dbus::MessageWriter entry_writer(NULL); |
121 array_writer.OpenDictEntry(&entry_writer); | 121 array_writer.OpenDictEntry(&entry_writer); |
122 entry_writer.AppendString(shill::kCellularAllowRoamingProperty); | 122 entry_writer.AppendString(shill::kCellularAllowRoamingProperty); |
123 entry_writer.AppendVariantOfBool(kValue); | 123 entry_writer.AppendVariantOfBool(kValue); |
124 array_writer.CloseContainer(&entry_writer); | 124 array_writer.CloseContainer(&entry_writer); |
125 writer.CloseContainer(&array_writer); | 125 writer.CloseContainer(&array_writer); |
126 | 126 |
127 // Set expectations. | 127 // Set expectations. |
128 base::DictionaryValue value; | 128 base::DictionaryValue value; |
129 value.SetWithoutPathExpansion(shill::kCellularAllowRoamingProperty, | 129 value.SetWithoutPathExpansion(shill::kCellularAllowRoamingProperty, |
130 base::Value::CreateBooleanValue(kValue)); | 130 new base::FundamentalValue(kValue)); |
131 PrepareForMethodCall(shill::kGetPropertiesFunction, | 131 PrepareForMethodCall(shill::kGetPropertiesFunction, |
132 base::Bind(&ExpectNoArgument), | 132 base::Bind(&ExpectNoArgument), |
133 response.get()); | 133 response.get()); |
134 // Call method. | 134 // Call method. |
135 client_->GetProperties(dbus::ObjectPath(kExampleDevicePath), | 135 client_->GetProperties(dbus::ObjectPath(kExampleDevicePath), |
136 base::Bind(&ExpectDictionaryValueResult, &value)); | 136 base::Bind(&ExpectDictionaryValueResult, &value)); |
137 // Run the message loop. | 137 // Run the message loop. |
138 message_loop_.RunUntilIdle(); | 138 message_loop_.RunUntilIdle(); |
139 } | 139 } |
140 | 140 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 EXPECT_CALL(mock_closure, Run()).Times(1); | 375 EXPECT_CALL(mock_closure, Run()).Times(1); |
376 // Call method. | 376 // Call method. |
377 client_->Reset(dbus::ObjectPath(kExampleDevicePath), | 377 client_->Reset(dbus::ObjectPath(kExampleDevicePath), |
378 mock_closure.GetCallback(), | 378 mock_closure.GetCallback(), |
379 mock_error_callback.GetCallback()); | 379 mock_error_callback.GetCallback()); |
380 // Run the message loop. | 380 // Run the message loop. |
381 message_loop_.RunUntilIdle(); | 381 message_loop_.RunUntilIdle(); |
382 } | 382 } |
383 | 383 |
384 } // namespace chromeos | 384 } // namespace chromeos |
OLD | NEW |