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

Unified Diff: chrome/browser/policy/async_policy_provider_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/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);

Powered by Google App Engine
This is Rietveld 408576698