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/flimflam_client_unittest_base.h" | 7 #include "chromeos/dbus/flimflam_client_unittest_base.h" |
8 #include "chromeos/dbus/flimflam_network_client.h" | 8 #include "chromeos/dbus/flimflam_network_client.h" |
9 #include "dbus/message.h" | 9 #include "dbus/message.h" |
10 #include "dbus/values_util.h" | 10 #include "dbus/values_util.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "third_party/cros_system_api/dbus/service_constants.h" | 12 #include "third_party/cros_system_api/dbus/service_constants.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class FlimflamNetworkClientTest : public FlimflamClientUnittestBase { | 16 class FlimflamNetworkClientTest : public FlimflamClientUnittestBase { |
17 public: | 17 public: |
18 FlimflamNetworkClientTest() | 18 FlimflamNetworkClientTest() |
19 : FlimflamClientUnittestBase(flimflam::kFlimflamNetworkInterface) { | 19 : FlimflamClientUnittestBase( |
| 20 flimflam::kFlimflamNetworkInterface, |
| 21 dbus::ObjectPath(flimflam::kFlimflamServicePath)) { |
20 } | 22 } |
21 | 23 |
22 virtual void SetUp() { | 24 virtual void SetUp() { |
23 FlimflamClientUnittestBase::SetUp(); | 25 FlimflamClientUnittestBase::SetUp(); |
24 // Create a client with the mock bus. | 26 // Create a client with the mock bus. |
25 client_.reset(FlimflamNetworkClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, | 27 client_.reset(FlimflamNetworkClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, |
26 mock_bus_)); | 28 mock_bus_)); |
27 // Run the message loop to run the signal connection result callback. | 29 // Run the message loop to run the signal connection result callback. |
28 message_loop_.RunAllPending(); | 30 message_loop_.RunAllPending(); |
29 } | 31 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 base::Bind(&ExpectNoArgument), | 118 base::Bind(&ExpectNoArgument), |
117 response.get()); | 119 response.get()); |
118 // Call method. | 120 // Call method. |
119 client_->GetProperties(base::Bind(&ExpectDictionaryValueResult, | 121 client_->GetProperties(base::Bind(&ExpectDictionaryValueResult, |
120 &value)); | 122 &value)); |
121 // Run the message loop. | 123 // Run the message loop. |
122 message_loop_.RunAllPending(); | 124 message_loop_.RunAllPending(); |
123 } | 125 } |
124 | 126 |
125 } // namespace chromeos | 127 } // namespace chromeos |
OLD | NEW |