| 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 "chromeos/dbus/shill_client_unittest_base.h" | 5 #include "chromeos/dbus/shill_client_unittest_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chromeos/network/shill_property_util.h" | 10 #include "chromeos/network/shill_property_util.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 // Set an expectation so mock_bus's GetObjectProxy() for the given | 150 // Set an expectation so mock_bus's GetObjectProxy() for the given |
| 151 // service name and the object path will return mock_proxy_. | 151 // service name and the object path will return mock_proxy_. |
| 152 EXPECT_CALL(*mock_bus_.get(), | 152 EXPECT_CALL(*mock_bus_.get(), |
| 153 GetObjectProxy(shill::kFlimflamServiceName, object_path_)) | 153 GetObjectProxy(shill::kFlimflamServiceName, object_path_)) |
| 154 .WillOnce(Return(mock_proxy_.get())); | 154 .WillOnce(Return(mock_proxy_.get())); |
| 155 | 155 |
| 156 // Set an expectation so mock_bus's GetDBusTaskRunner will return the current | 156 // Set an expectation so mock_bus's GetDBusTaskRunner will return the current |
| 157 // task runner. | 157 // task runner. |
| 158 EXPECT_CALL(*mock_bus_.get(), GetDBusTaskRunner()) | 158 EXPECT_CALL(*mock_bus_.get(), GetDBusTaskRunner()) |
| 159 .WillRepeatedly(Return(message_loop_.message_loop_proxy())); | 159 .WillRepeatedly(Return(message_loop_.message_loop_proxy().get())); |
| 160 | 160 |
| 161 // ShutdownAndBlock() will be called in TearDown(). | 161 // ShutdownAndBlock() will be called in TearDown(). |
| 162 EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return()); | 162 EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void ShillClientUnittestBase::TearDown() { | 165 void ShillClientUnittestBase::TearDown() { |
| 166 mock_bus_->ShutdownAndBlock(); | 166 mock_bus_->ShutdownAndBlock(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void ShillClientUnittestBase::PrepareForMethodCall( | 169 void ShillClientUnittestBase::PrepareForMethodCall( |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 void ShillClientUnittestBase::OnCallMethodWithErrorCallback( | 379 void ShillClientUnittestBase::OnCallMethodWithErrorCallback( |
| 380 dbus::MethodCall* method_call, | 380 dbus::MethodCall* method_call, |
| 381 int timeout_ms, | 381 int timeout_ms, |
| 382 const dbus::ObjectProxy::ResponseCallback& response_callback, | 382 const dbus::ObjectProxy::ResponseCallback& response_callback, |
| 383 const dbus::ObjectProxy::ErrorCallback& error_callback) { | 383 const dbus::ObjectProxy::ErrorCallback& error_callback) { |
| 384 OnCallMethod(method_call, timeout_ms, response_callback); | 384 OnCallMethod(method_call, timeout_ms, response_callback); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace chromeos | 387 } // namespace chromeos |
| OLD | NEW |