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

Unified Diff: chrome/browser/policy/user_cloud_policy_store_chromeos_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/user_cloud_policy_store_chromeos_unittest.cc
diff --git a/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc b/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc
index aba7eb0d7f679c59b742b927e5935ca0d1b71718..a7724288b21810d43eaefd1d09235aead61a9a06 100644
--- a/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc
+++ b/chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc
@@ -71,7 +71,7 @@ class UserCloudPolicyStoreChromeOSTest : public testing::Test {
virtual void TearDown() OVERRIDE {
store_->RemoveObserver(&observer_);
store_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
// Install an expectation on |observer_| for an error code.
@@ -90,12 +90,12 @@ class UserCloudPolicyStoreChromeOSTest : public testing::Test {
EXPECT_CALL(session_manager_client_, RetrieveUserPolicy(_))
.WillOnce(SaveArg<0>(&retrieve_callback));
store_->Load();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
ASSERT_FALSE(retrieve_callback.is_null());
// Run the callback.
retrieve_callback.Run(response);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
// Verifies that store_->policy_map() has the ShowHomeButton entry.
@@ -136,7 +136,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, Store) {
EXPECT_CALL(session_manager_client_, StoreUserPolicy(policy_.GetBlob(), _))
.WillOnce(SaveArg<1>(&store_callback));
store_->Store(policy_.policy());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
// No policy should be present yet.
EXPECT_FALSE(store_->policy());
@@ -149,7 +149,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, Store) {
EXPECT_CALL(session_manager_client_, RetrieveUserPolicy(_))
.WillOnce(SaveArg<0>(&retrieve_callback));
store_callback.Run(true);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_TRUE(store_->policy_map().empty());
EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status());
ASSERT_FALSE(retrieve_callback.is_null());
@@ -157,7 +157,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, Store) {
// Finish the retrieve callback.
EXPECT_CALL(observer_, OnStoreLoaded(store_.get()));
retrieve_callback.Run(policy_.GetBlob());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
ASSERT_TRUE(store_->policy());
EXPECT_EQ(policy_.policy_data().SerializeAsString(),
store_->policy()->SerializeAsString());
@@ -171,13 +171,13 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, StoreFail) {
EXPECT_CALL(session_manager_client_, StoreUserPolicy(policy_.GetBlob(), _))
.WillOnce(SaveArg<1>(&store_callback));
store_->Store(policy_.policy());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
// Let the store operation complete.
ASSERT_FALSE(store_callback.is_null());
ExpectError(CloudPolicyStore::STATUS_STORE_ERROR);
store_callback.Run(false);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_FALSE(store_->policy());
EXPECT_TRUE(store_->policy_map().empty());
EXPECT_EQ(CloudPolicyStore::STATUS_STORE_ERROR, store_->status());
@@ -193,7 +193,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, StoreValidationError) {
EXPECT_CALL(session_manager_client_, StoreUserPolicy(policy_.GetBlob(), _))
.Times(0);
store_->Store(policy_.policy());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(UserCloudPolicyStoreChromeOSTest, Load) {
« no previous file with comments | « chrome/browser/policy/url_blacklist_manager_unittest.cc ('k') | chrome/browser/policy/user_policy_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698