Index: chrome/browser/policy/async_policy_provider_unittest.cc |
diff --git a/chrome/browser/policy/async_policy_provider_unittest.cc b/chrome/browser/policy/async_policy_provider_unittest.cc |
index 2272f590bdbdfec51b32699d14217c3109adbb89..9fc76f6f0a1a59d08fddbe12585eefc50fbe68a8 100644 |
--- a/chrome/browser/policy/async_policy_provider_unittest.cc |
+++ b/chrome/browser/policy/async_policy_provider_unittest.cc |
@@ -107,7 +107,7 @@ void AsyncPolicyProviderTest::SetUp() { |
// Verify that the initial load is done synchronously: |
EXPECT_TRUE(provider_->policies().Equals(initial_bundle_)); |
- loop_.RunAllPending(); |
+ loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(loader_); |
EXPECT_CALL(*loader_, LastModificationTime()) |
@@ -119,7 +119,7 @@ void AsyncPolicyProviderTest::TearDown() { |
provider_->Shutdown(); |
provider_.reset(); |
} |
- loop_.RunAllPending(); |
+ loop_.RunUntilIdle(); |
} |
TEST_F(AsyncPolicyProviderTest, RefreshPolicies) { |
@@ -131,7 +131,7 @@ TEST_F(AsyncPolicyProviderTest, RefreshPolicies) { |
provider_->AddObserver(&observer); |
EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(1); |
provider_->RefreshPolicies(); |
- loop_.RunAllPending(); |
+ loop_.RunUntilIdle(); |
// The refreshed policies are now provided. |
EXPECT_TRUE(provider_->policies().Equals(refreshed_bundle)); |
provider_->RemoveObserver(&observer); |
@@ -155,7 +155,7 @@ TEST_F(AsyncPolicyProviderTest, RefreshPoliciesTwice) { |
Mock::VerifyAndClearExpectations(&observer); |
EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(1); |
- loop_.RunAllPending(); |
+ loop_.RunUntilIdle(); |
// The refreshed policies are now provided. |
EXPECT_TRUE(provider_->policies().Equals(refreshed_bundle)); |
Mock::VerifyAndClearExpectations(&observer); |
@@ -191,7 +191,7 @@ TEST_F(AsyncPolicyProviderTest, RefreshPoliciesDuringReload) { |
Mock::VerifyAndClearExpectations(&observer); |
EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(1); |
- loop_.RunAllPending(); |
+ loop_.RunUntilIdle(); |
// The refreshed policies are now provided, and the |reloaded_bundle| was |
// dropped. |
EXPECT_TRUE(provider_->policies().Equals(refreshed_bundle)); |
@@ -213,7 +213,7 @@ TEST_F(AsyncPolicyProviderTest, Shutdown) { |
EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); |
provider_->Shutdown(); |
- loop_.RunAllPending(); |
+ loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&observer); |
provider_->RemoveObserver(&observer); |