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) { |