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

Unified Diff: chrome/browser/policy/url_blacklist_manager_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/url_blacklist_manager_unittest.cc
diff --git a/chrome/browser/policy/url_blacklist_manager_unittest.cc b/chrome/browser/policy/url_blacklist_manager_unittest.cc
index cbe92ffb971dd91bee68aeb2afd4eae7db9d20ef..954d309d2d7d505ab7b956f7942f5a54fd9d6b1c 100644
--- a/chrome/browser/policy/url_blacklist_manager_unittest.cc
+++ b/chrome/browser/policy/url_blacklist_manager_unittest.cc
@@ -76,13 +76,13 @@ class URLBlacklistManagerTest : public testing::Test {
pref_service_.RegisterListPref(prefs::kUrlWhitelist);
blacklist_manager_.reset(
new TestingURLBlacklistManager(&pref_service_));
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
virtual void TearDown() OVERRIDE {
if (blacklist_manager_.get())
blacklist_manager_->ShutdownOnUIThread();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
// Delete |blacklist_manager_| while |io_thread_| is mapping IO to
// |loop_|.
blacklist_manager_.reset();
@@ -181,7 +181,7 @@ TEST_F(URLBlacklistManagerTest, SingleUpdateForTwoPrefChanges) {
whitelist->Append(new StringValue("mail.google.com"));
pref_service_.SetManagedPref(prefs::kUrlBlacklist, blacklist);
pref_service_.SetManagedPref(prefs::kUrlBlacklist, whitelist);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_EQ(1, blacklist_manager_->update_called());
}
@@ -193,7 +193,7 @@ TEST_F(URLBlacklistManagerTest, ShutdownWithPendingTask0) {
blacklist_manager_->ShutdownOnUIThread();
blacklist_manager_.reset();
// Run the task after shutdown and deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(URLBlacklistManagerTest, ShutdownWithPendingTask1) {
@@ -202,11 +202,11 @@ TEST_F(URLBlacklistManagerTest, ShutdownWithPendingTask1) {
// Shutdown comes before the task is executed.
blacklist_manager_->ShutdownOnUIThread();
// Run the task after shutdown, but before deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_EQ(0, blacklist_manager_->update_called());
blacklist_manager_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(URLBlacklistManagerTest, ShutdownWithPendingTask2) {
@@ -217,7 +217,7 @@ TEST_F(URLBlacklistManagerTest, ShutdownWithPendingTask2) {
EXPECT_FALSE(blacklist_manager_->set_blacklist_called());
blacklist_manager_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(URLBlacklistManagerTest, HasStandardScheme) {

Powered by Google App Engine
This is Rietveld 408576698