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