| Index: chromeos/dbus/shill_device_client_unittest.cc
|
| diff --git a/chromeos/dbus/shill_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc
|
| index a343df86fa4ec48fa41cffb9f0731ed51f3d7a3d..0c518cfcc692926f8913b9a9f1b1e95551275abc 100644
|
| --- a/chromeos/dbus/shill_device_client_unittest.cc
|
| +++ b/chromeos/dbus/shill_device_client_unittest.cc
|
| @@ -12,6 +12,8 @@
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/cros_system_api/dbus/service_constants.h"
|
|
|
| +using testing::_;
|
| +
|
| namespace chromeos {
|
|
|
| namespace {
|
| @@ -177,10 +179,16 @@ TEST_F(ShillDeviceClientTest, SetProperty) {
|
| &value),
|
| response.get());
|
| // Call method.
|
| + MockClosure mock_closure;
|
| + MockErrorCallback mock_error_callback;
|
| client_->SetProperty(dbus::ObjectPath(kExampleDevicePath),
|
| flimflam::kCellularAllowRoamingProperty,
|
| value,
|
| - base::Bind(&ExpectNoResultValue));
|
| + mock_closure.GetCallback(),
|
| + mock_error_callback.GetCallback());
|
| + EXPECT_CALL(mock_closure, Run()).Times(1);
|
| + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
|
| +
|
| // Run the message loop.
|
| message_loop_.RunAllPending();
|
| }
|
| @@ -253,6 +261,7 @@ TEST_F(ShillDeviceClientTest, RequirePin) {
|
| kRequired),
|
| response.get());
|
| EXPECT_CALL(mock_closure, Run()).Times(1);
|
| + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
|
| // Call method.
|
| client_->RequirePin(dbus::ObjectPath(kExampleDevicePath),
|
| kPin,
|
| @@ -276,6 +285,8 @@ TEST_F(ShillDeviceClientTest, EnterPin) {
|
| kPin),
|
| response.get());
|
| EXPECT_CALL(mock_closure, Run()).Times(1);
|
| + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
|
| +
|
| // Call method.
|
| client_->EnterPin(dbus::ObjectPath(kExampleDevicePath),
|
| kPin,
|
| @@ -298,6 +309,8 @@ TEST_F(ShillDeviceClientTest, UnblockPin) {
|
| base::Bind(&ExpectTwoStringArguments, kPuk, kPin),
|
| response.get());
|
| EXPECT_CALL(mock_closure, Run()).Times(1);
|
| + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
|
| +
|
| // Call method.
|
| client_->UnblockPin(dbus::ObjectPath(kExampleDevicePath),
|
| kPuk,
|
| @@ -323,6 +336,8 @@ TEST_F(ShillDeviceClientTest, ChangePin) {
|
| kNewPin),
|
| response.get());
|
| EXPECT_CALL(mock_closure, Run()).Times(1);
|
| + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
|
| +
|
| // Call method.
|
| client_->ChangePin(dbus::ObjectPath(kExampleDevicePath),
|
| kOldPin,
|
| @@ -345,6 +360,8 @@ TEST_F(ShillDeviceClientTest, Register) {
|
| base::Bind(&ExpectStringArgument, kNetworkId),
|
| response.get());
|
| EXPECT_CALL(mock_closure, Run()).Times(1);
|
| + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
|
| +
|
| // Call method.
|
| client_->Register(dbus::ObjectPath(kExampleDevicePath),
|
| kNetworkId,
|
|
|