shill: Set non-default expectation on mock DBus proxy object.
The companion CL sets new default expectations on cellular related mock DBus
proxy objects. This CL sets a necessary non-default expectation in one of the
tests.
BUG=chromium:409386
TEST=shill unittests.
Change-Id: I9c32b5b19106e72ae3a1b4ee4a3e87c46f812229
Reviewed-on: https://chromium-review.googlesource.com/215791
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/cellular_unittest.cc b/cellular_unittest.cc
index 075de03..26e26be 100644
--- a/cellular_unittest.cc
+++ b/cellular_unittest.cc
@@ -1853,7 +1853,8 @@
// proxy OnAfterResume, below.
Error error;
ASSERT_TRUE(error.IsSuccess());
- EXPECT_CALL(*mm1_proxy, SetPowerState(MM_MODEM_POWER_STATE_LOW, _, _, _));
+ EXPECT_CALL(*mm1_proxy, SetPowerState(MM_MODEM_POWER_STATE_LOW, _, _, _))
+ .WillOnce(SetErrorTypeInArgument<1>(Error::kOperationInitiated));
modem_proxy_enable_callback.Run(error);
// No response to power-down yet. It probably completed while the host