Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: chrome/browser/policy/policy_service_impl_unittest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(
« no previous file with comments | « chrome/browser/policy/policy_loader_mac_unittest.cc ('k') | chrome/browser/policy/url_blacklist_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698