| Index: chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
|
| diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc b/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
|
| index 0f9160a7a19fda837efa627b41a451bd57904330..c77f9c1771784fb9de93c8ec8d1d460645a8675b 100644
|
| --- a/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
|
| +++ b/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
|
| @@ -405,7 +405,9 @@ TEST_F(DeviceLocalAccountPolicyServiceTest, FetchPolicy) {
|
| device_policy_.policy_data().device_id(),
|
| _))
|
| .WillOnce(SaveArg<6>(&request));
|
| - EXPECT_CALL(service_observer_, OnPolicyUpdated(account_1_user_id_));
|
| + // This will be called twice, because the ComponentCloudPolicyService will
|
| + // also become ready after flushing all the pending tasks.
|
| + EXPECT_CALL(service_observer_, OnPolicyUpdated(account_1_user_id_)).Times(2);
|
| broker->core()->client()->FetchPolicy();
|
| FlushDeviceSettings();
|
| Mock::VerifyAndClearExpectations(&service_observer_);
|
| @@ -449,7 +451,9 @@ TEST_F(DeviceLocalAccountPolicyServiceTest, RefreshPolicy) {
|
| .WillOnce(mock_device_management_service_.SucceedJob(response));
|
| EXPECT_CALL(mock_device_management_service_, StartJob(_, _, _, _, _, _, _));
|
| EXPECT_CALL(*this, OnRefreshDone(true)).Times(1);
|
| - EXPECT_CALL(service_observer_, OnPolicyUpdated(account_1_user_id_));
|
| + // This will be called twice, because the ComponentCloudPolicyService will
|
| + // also become ready after flushing all the pending tasks.
|
| + EXPECT_CALL(service_observer_, OnPolicyUpdated(account_1_user_id_)).Times(2);
|
| broker->core()->service()->RefreshPolicy(
|
| base::Bind(&DeviceLocalAccountPolicyServiceTest::OnRefreshDone,
|
| base::Unretained(this)));
|
|
|