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 "chromeos/dbus/flimflam_client_unittest_base.h" | 6 #include "chromeos/dbus/flimflam_client_unittest_base.h" |
7 #include "chromeos/dbus/flimflam_manager_client.h" | 7 #include "chromeos/dbus/flimflam_manager_client.h" |
8 #include "dbus/message.h" | 8 #include "dbus/message.h" |
9 #include "dbus/object_path.h" | 9 #include "dbus/object_path.h" |
10 #include "dbus/values_util.h" | 10 #include "dbus/values_util.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 flimflam::kSecurityProperty, | 91 flimflam::kSecurityProperty, |
92 base::Value::CreateStringValue(flimflam::kSecurityPsk)); | 92 base::Value::CreateStringValue(flimflam::kSecurityPsk)); |
93 return properties; | 93 return properties; |
94 } | 94 } |
95 | 95 |
96 } // namespace | 96 } // namespace |
97 | 97 |
98 class FlimflamManagerClientTest : public FlimflamClientUnittestBase { | 98 class FlimflamManagerClientTest : public FlimflamClientUnittestBase { |
99 public: | 99 public: |
100 FlimflamManagerClientTest() | 100 FlimflamManagerClientTest() |
101 : FlimflamClientUnittestBase(flimflam::kFlimflamManagerInterface) { | 101 : FlimflamClientUnittestBase( |
| 102 flimflam::kFlimflamManagerInterface, |
| 103 dbus::ObjectPath(flimflam::kFlimflamServicePath)) { |
102 } | 104 } |
103 | 105 |
104 virtual void SetUp() { | 106 virtual void SetUp() { |
105 FlimflamClientUnittestBase::SetUp(); | 107 FlimflamClientUnittestBase::SetUp(); |
106 // Create a client with the mock bus. | 108 // Create a client with the mock bus. |
107 client_.reset(FlimflamManagerClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, | 109 client_.reset(FlimflamManagerClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, |
108 mock_bus_)); | 110 mock_bus_)); |
109 // Run the message loop to run the signal connection result callback. | 111 // Run the message loop to run the signal connection result callback. |
110 message_loop_.RunAllPending(); | 112 message_loop_.RunAllPending(); |
111 } | 113 } |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 PrepareForMethodCall(flimflam::kGetServiceFunction, | 254 PrepareForMethodCall(flimflam::kGetServiceFunction, |
253 base::Bind(&ExpectDictionaryValueArgument, arg.get()), | 255 base::Bind(&ExpectDictionaryValueArgument, arg.get()), |
254 response.get()); | 256 response.get()); |
255 // Call method. | 257 // Call method. |
256 client_->GetService(*arg, base::Bind(&ExpectObjectPathResult, object_path)); | 258 client_->GetService(*arg, base::Bind(&ExpectObjectPathResult, object_path)); |
257 // Run the message loop. | 259 // Run the message loop. |
258 message_loop_.RunAllPending(); | 260 message_loop_.RunAllPending(); |
259 } | 261 } |
260 | 262 |
261 } // namespace chromeos | 263 } // namespace chromeos |
OLD | NEW |