Chromium Code Reviews| Index: chrome/browser/policy/cloud_policy_controller_unittest.cc |
| diff --git a/chrome/browser/policy/cloud_policy_controller_unittest.cc b/chrome/browser/policy/cloud_policy_controller_unittest.cc |
| index b358a1ff1166ef7166d186461412490d650bf84f..46b1c17979d79b99b118b4d5586184665a614ac6 100644 |
| --- a/chrome/browser/policy/cloud_policy_controller_unittest.cc |
| +++ b/chrome/browser/policy/cloud_policy_controller_unittest.cc |
| @@ -21,6 +21,7 @@ |
| namespace policy { |
| using ::testing::_; |
| +using ::testing::AnyNumber; |
| using ::testing::AtLeast; |
| using ::testing::InSequence; |
| using ::testing::Mock; |
| @@ -52,7 +53,9 @@ class CloudPolicyControllerTest : public testing::Test { |
| cache_.reset(new UserPolicyCache( |
| temp_user_data_dir_.path().AppendASCII("CloudPolicyControllerTest"))); |
| token_fetcher_.reset(new MockDeviceTokenFetcher(cache_.get())); |
| - service_.set_backend(&backend_); |
| + EXPECT_CALL(service_, CreateBackend()) |
|
gfeher
2011/07/19 13:45:33
Please try ON_CALL here.
Joao da Silva
2011/07/19 15:19:39
Tried, but didn't work. ON_CALL unfortunately only
gfeher
2011/07/20 11:56:22
Okay, I see. So we need an expectation to avoid "u
|
| + .Times(AnyNumber()) |
| + .WillRepeatedly(MockDeviceManagementServiceProxyBackend(&backend_)); |
| data_store_.reset(CloudPolicyDataStore::CreateForUserPolicies()); |
| } |