Index: chrome/browser/policy/policy_service_impl_unittest.cc |
diff --git a/chrome/browser/policy/policy_service_impl_unittest.cc b/chrome/browser/policy/policy_service_impl_unittest.cc |
index 7723f5ea48d135045286c4f6c00c300e363e9d7a..4ee3a677677c7279a941e6d154cf1f7e67e458bb 100644 |
--- a/chrome/browser/policy/policy_service_impl_unittest.cc |
+++ b/chrome/browser/policy/policy_service_impl_unittest.cc |
@@ -376,7 +376,7 @@ TEST_F(PolicyServiceTest, RefreshPolicies) { |
policy_service_->RefreshPolicies(base::Bind( |
&PolicyServiceTest::OnPolicyRefresh, |
base::Unretained(this))); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
EXPECT_CALL(*this, OnPolicyRefresh()).Times(0); |
@@ -384,7 +384,7 @@ TEST_F(PolicyServiceTest, RefreshPolicies) { |
policy0_.Set("aaa", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
kValue0.DeepCopy()); |
provider0_.UpdateChromePolicy(policy0_); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
EXPECT_CALL(*this, OnPolicyRefresh()).Times(0); |
@@ -392,7 +392,7 @@ TEST_F(PolicyServiceTest, RefreshPolicies) { |
policy1_.Set("aaa", POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, |
kValue1.DeepCopy()); |
provider1_.UpdateChromePolicy(policy1_); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
// A provider can refresh more than once after a RefreshPolicies call, but |
@@ -402,7 +402,7 @@ TEST_F(PolicyServiceTest, RefreshPolicies) { |
policy1_.Set("bbb", POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, |
kValue1.DeepCopy()); |
provider1_.UpdateChromePolicy(policy1_); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
// If another RefreshPolicies() call happens while waiting for a previous |
@@ -411,14 +411,14 @@ TEST_F(PolicyServiceTest, RefreshPolicies) { |
policy_service_->RefreshPolicies(base::Bind( |
&PolicyServiceTest::OnPolicyRefresh, |
base::Unretained(this))); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
EXPECT_CALL(*this, OnPolicyRefresh()).Times(0); |
policy2_.Set("bbb", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
kValue0.DeepCopy()); |
provider2_.UpdateChromePolicy(policy2_); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
// Providers 0 and 1 must reload again. |
@@ -428,7 +428,7 @@ TEST_F(PolicyServiceTest, RefreshPolicies) { |
kValue2.DeepCopy()); |
provider0_.UpdateChromePolicy(policy0_); |
provider1_.UpdateChromePolicy(policy1_); |
- loop.RunAllPending(); |
+ loop.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(this); |
const PolicyMap& policies = policy_service_->GetPolicies( |