| Index: chromeos/dbus/shill_client_unittest_base.cc
|
| diff --git a/chromeos/dbus/flimflam_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc
|
| similarity index 78%
|
| rename from chromeos/dbus/flimflam_client_unittest_base.cc
|
| rename to chromeos/dbus/shill_client_unittest_base.cc
|
| index 67046f9841ea6a181a270f8259f8bf12c7e23c43..c02f0bc2e86325c7e6d81ccc4dcb5995f3c50871 100644
|
| --- a/chromeos/dbus/flimflam_client_unittest_base.cc
|
| +++ b/chromeos/dbus/shill_client_unittest_base.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chromeos/dbus/flimflam_client_unittest_base.h"
|
| +#include "chromeos/dbus/shill_client_unittest_base.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/json/json_writer.h"
|
| @@ -30,26 +30,26 @@ void RunTask(const tracked_objects::Location& from_here,
|
|
|
| } // namespace
|
|
|
| -FlimflamClientUnittestBase::MockClosure::MockClosure() {}
|
| +ShillClientUnittestBase::MockClosure::MockClosure() {}
|
|
|
| -FlimflamClientUnittestBase::MockClosure::~MockClosure() {}
|
| +ShillClientUnittestBase::MockClosure::~MockClosure() {}
|
|
|
| -base::Closure FlimflamClientUnittestBase::MockClosure::GetCallback() {
|
| +base::Closure ShillClientUnittestBase::MockClosure::GetCallback() {
|
| return base::Bind(&MockClosure::Run, base::Unretained(this));
|
| }
|
|
|
|
|
| -FlimflamClientUnittestBase::MockErrorCallback::MockErrorCallback() {}
|
| +ShillClientUnittestBase::MockErrorCallback::MockErrorCallback() {}
|
|
|
| -FlimflamClientUnittestBase::MockErrorCallback::~MockErrorCallback() {}
|
| +ShillClientUnittestBase::MockErrorCallback::~MockErrorCallback() {}
|
|
|
| -FlimflamClientHelper::ErrorCallback
|
| -FlimflamClientUnittestBase::MockErrorCallback::GetCallback() {
|
| +ShillClientHelper::ErrorCallback
|
| +ShillClientUnittestBase::MockErrorCallback::GetCallback() {
|
| return base::Bind(&MockErrorCallback::Run, base::Unretained(this));
|
| }
|
|
|
|
|
| -FlimflamClientUnittestBase::FlimflamClientUnittestBase(
|
| +ShillClientUnittestBase::ShillClientUnittestBase(
|
| const std::string& interface_name,
|
| const dbus::ObjectPath& object_path)
|
| : interface_name_(interface_name),
|
| @@ -57,10 +57,10 @@ FlimflamClientUnittestBase::FlimflamClientUnittestBase(
|
| response_(NULL) {
|
| }
|
|
|
| -FlimflamClientUnittestBase::~FlimflamClientUnittestBase() {
|
| +ShillClientUnittestBase::~ShillClientUnittestBase() {
|
| }
|
|
|
| -void FlimflamClientUnittestBase::SetUp() {
|
| +void ShillClientUnittestBase::SetUp() {
|
| // Create a mock bus.
|
| dbus::Bus::Options options;
|
| options.bus_type = dbus::Bus::SYSTEM;
|
| @@ -76,18 +76,18 @@ void FlimflamClientUnittestBase::SetUp() {
|
| // OnCallMethodAndBlock() to return responses.
|
| EXPECT_CALL(*mock_proxy_, CallMethodAndBlock(_, _))
|
| .WillRepeatedly(Invoke(
|
| - this, &FlimflamClientUnittestBase::OnCallMethodAndBlock));
|
| + this, &ShillClientUnittestBase::OnCallMethodAndBlock));
|
|
|
| // Set an expectation so mock_proxy's CallMethod() will use OnCallMethod()
|
| // to return responses.
|
| EXPECT_CALL(*mock_proxy_, CallMethod(_, _, _))
|
| - .WillRepeatedly(Invoke(this, &FlimflamClientUnittestBase::OnCallMethod));
|
| + .WillRepeatedly(Invoke(this, &ShillClientUnittestBase::OnCallMethod));
|
|
|
| // Set an expectation so mock_proxy's CallMethodWithErrorCallback() will use
|
| // OnCallMethodWithErrorCallback() to return responses.
|
| EXPECT_CALL(*mock_proxy_, CallMethodWithErrorCallback(_, _, _, _))
|
| .WillRepeatedly(Invoke(
|
| - this, &FlimflamClientUnittestBase::OnCallMethodWithErrorCallback));
|
| + this, &ShillClientUnittestBase::OnCallMethodWithErrorCallback));
|
|
|
| // Set an expectation so mock_proxy's ConnectToSignal() will use
|
| // OnConnectToSignal() to run the callback.
|
| @@ -95,7 +95,7 @@ void FlimflamClientUnittestBase::SetUp() {
|
| interface_name_,
|
| flimflam::kMonitorPropertyChanged, _, _))
|
| .WillRepeatedly(Invoke(this,
|
| - &FlimflamClientUnittestBase::OnConnectToSignal));
|
| + &ShillClientUnittestBase::OnConnectToSignal));
|
|
|
| // Set an expectation so mock_bus's GetObjectProxy() for the given
|
| // service name and the object path will return mock_proxy_.
|
| @@ -112,11 +112,11 @@ void FlimflamClientUnittestBase::SetUp() {
|
| EXPECT_CALL(*mock_bus_, ShutdownAndBlock()).WillOnce(Return());
|
| }
|
|
|
| -void FlimflamClientUnittestBase::TearDown() {
|
| +void ShillClientUnittestBase::TearDown() {
|
| mock_bus_->ShutdownAndBlock();
|
| }
|
|
|
| -void FlimflamClientUnittestBase::PrepareForMethodCall(
|
| +void ShillClientUnittestBase::PrepareForMethodCall(
|
| const std::string& method_name,
|
| const ArgumentCheckCallback& argument_checker,
|
| dbus::Response* response) {
|
| @@ -125,14 +125,14 @@ void FlimflamClientUnittestBase::PrepareForMethodCall(
|
| response_ = response;
|
| }
|
|
|
| -void FlimflamClientUnittestBase::SendPropertyChangedSignal(
|
| +void ShillClientUnittestBase::SendPropertyChangedSignal(
|
| dbus::Signal* signal) {
|
| ASSERT_FALSE(property_changed_handler_.is_null());
|
| property_changed_handler_.Run(signal);
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectPropertyChanged(
|
| +void ShillClientUnittestBase::ExpectPropertyChanged(
|
| const std::string& expected_name,
|
| const base::Value* expected_value,
|
| const std::string& name,
|
| @@ -142,12 +142,12 @@ void FlimflamClientUnittestBase::ExpectPropertyChanged(
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectNoArgument(dbus::MessageReader* reader) {
|
| +void ShillClientUnittestBase::ExpectNoArgument(dbus::MessageReader* reader) {
|
| EXPECT_FALSE(reader->HasMoreData());
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectStringArgument(
|
| +void ShillClientUnittestBase::ExpectStringArgument(
|
| const std::string& expected_string,
|
| dbus::MessageReader* reader) {
|
| std::string str;
|
| @@ -157,7 +157,7 @@ void FlimflamClientUnittestBase::ExpectStringArgument(
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectValueArgument(
|
| +void ShillClientUnittestBase::ExpectValueArgument(
|
| const base::Value* expected_value,
|
| dbus::MessageReader* reader) {
|
| scoped_ptr<base::Value> value(dbus::PopDataAsValue(reader));
|
| @@ -167,7 +167,7 @@ void FlimflamClientUnittestBase::ExpectValueArgument(
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectStringAndValueArguments(
|
| +void ShillClientUnittestBase::ExpectStringAndValueArguments(
|
| const std::string& expected_string,
|
| const base::Value* expected_value,
|
| dbus::MessageReader* reader) {
|
| @@ -181,13 +181,13 @@ void FlimflamClientUnittestBase::ExpectStringAndValueArguments(
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectNoResultValue(
|
| +void ShillClientUnittestBase::ExpectNoResultValue(
|
| DBusMethodCallStatus call_status) {
|
| EXPECT_EQ(DBUS_METHOD_CALL_SUCCESS, call_status);
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectObjectPathResult(
|
| +void ShillClientUnittestBase::ExpectObjectPathResult(
|
| const dbus::ObjectPath& expected_result,
|
| DBusMethodCallStatus call_status,
|
| const dbus::ObjectPath& result) {
|
| @@ -196,7 +196,7 @@ void FlimflamClientUnittestBase::ExpectObjectPathResult(
|
| }
|
|
|
| // static
|
| -void FlimflamClientUnittestBase::ExpectDictionaryValueResult(
|
| +void ShillClientUnittestBase::ExpectDictionaryValueResult(
|
| const base::DictionaryValue* expected_result,
|
| DBusMethodCallStatus call_status,
|
| const base::DictionaryValue& result) {
|
| @@ -208,7 +208,7 @@ void FlimflamClientUnittestBase::ExpectDictionaryValueResult(
|
| EXPECT_EQ(expected_result_string, result_string);
|
| }
|
|
|
| -void FlimflamClientUnittestBase::OnConnectToSignal(
|
| +void ShillClientUnittestBase::OnConnectToSignal(
|
| const std::string& interface_name,
|
| const std::string& signal_name,
|
| const dbus::ObjectProxy::SignalCallback& signal_callback,
|
| @@ -222,7 +222,7 @@ void FlimflamClientUnittestBase::OnConnectToSignal(
|
| success));
|
| }
|
|
|
| -void FlimflamClientUnittestBase::OnCallMethod(
|
| +void ShillClientUnittestBase::OnCallMethod(
|
| dbus::MethodCall* method_call,
|
| int timeout_ms,
|
| const dbus::ObjectProxy::ResponseCallback& response_callback) {
|
| @@ -234,7 +234,7 @@ void FlimflamClientUnittestBase::OnCallMethod(
|
| base::Bind(response_callback, response_));
|
| }
|
|
|
| -void FlimflamClientUnittestBase::OnCallMethodWithErrorCallback(
|
| +void ShillClientUnittestBase::OnCallMethodWithErrorCallback(
|
| dbus::MethodCall* method_call,
|
| int timeout_ms,
|
| const dbus::ObjectProxy::ResponseCallback& response_callback,
|
| @@ -242,7 +242,7 @@ void FlimflamClientUnittestBase::OnCallMethodWithErrorCallback(
|
| OnCallMethod(method_call, timeout_ms, response_callback);
|
| }
|
|
|
| -dbus::Response* FlimflamClientUnittestBase::OnCallMethodAndBlock(
|
| +dbus::Response* ShillClientUnittestBase::OnCallMethodAndBlock(
|
| dbus::MethodCall* method_call,
|
| int timeout_ms) {
|
| EXPECT_EQ(interface_name_, method_call->GetInterface());
|
|
|