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

Unified Diff: chrome/browser/net/http_server_properties_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/net/http_server_properties_manager_unittest.cc
diff --git a/chrome/browser/net/http_server_properties_manager_unittest.cc b/chrome/browser/net/http_server_properties_manager_unittest.cc
index ab4bb319d39264f691006d4cd1b49e670cd44959..f06b16a99f325f7127f0acab17d4e531aca6cad7 100644
--- a/chrome/browser/net/http_server_properties_manager_unittest.cc
+++ b/chrome/browser/net/http_server_properties_manager_unittest.cc
@@ -88,13 +88,13 @@ class HttpServerPropertiesManagerTest : public testing::Test {
http_server_props_manager_.reset(
new StrictMock<TestingHttpServerPropertiesManager>(&pref_service_));
ExpectCacheUpdate();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
virtual void TearDown() OVERRIDE {
if (http_server_props_manager_.get())
http_server_props_manager_->ShutdownOnUIThread();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
// Delete |http_server_props_manager_| while |io_thread_| is mapping IO to
// |loop_|.
http_server_props_manager_.reset();
@@ -184,7 +184,7 @@ TEST_F(HttpServerPropertiesManagerTest,
pref_service_.SetManagedPref(prefs::kHttpServerProperties,
http_server_properties_dict2);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
// Verify SupportsSpdy.
@@ -232,7 +232,7 @@ TEST_F(HttpServerPropertiesManagerTest, SupportsSpdy) {
http_server_props_manager_->SetSupportsSpdy(spdy_server_mail, true);
// Run the task.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_TRUE(http_server_props_manager_->SupportsSpdy(spdy_server_mail));
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
@@ -250,7 +250,7 @@ TEST_F(HttpServerPropertiesManagerTest, SetSpdySetting) {
spdy_server_mail, id1, flags1, value1);
// Run the task.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
const net::SettingsMap& settings_map1_ret =
http_server_props_manager_->GetSpdySettings(spdy_server_mail);
@@ -274,7 +274,7 @@ TEST_F(HttpServerPropertiesManagerTest, HasAlternateProtocol) {
spdy_server_mail, 443, net::NPN_SPDY_2);
// Run the task.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
ASSERT_TRUE(
@@ -303,7 +303,7 @@ TEST_F(HttpServerPropertiesManagerTest, PipelineCapability) {
net::PIPELINE_INCAPABLE);
// Run the task.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_EQ(net::PIPELINE_CAPABLE,
http_server_props_manager_->GetPipelineCapability(known_pipeliner));
@@ -331,7 +331,7 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
net::PIPELINE_CAPABLE);
// Run the task.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_TRUE(http_server_props_manager_->SupportsSpdy(spdy_server_mail));
EXPECT_TRUE(
@@ -379,7 +379,7 @@ TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdateCache0) {
http_server_props_manager_->ShutdownOnUIThread();
http_server_props_manager_.reset();
// Run the task after shutdown and deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdateCache1) {
@@ -388,10 +388,10 @@ TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdateCache1) {
// Shutdown comes before the task is executed.
http_server_props_manager_->ShutdownOnUIThread();
// Run the task after shutdown, but before deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
http_server_props_manager_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdateCache2) {
@@ -399,10 +399,10 @@ TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdateCache2) {
// Shutdown comes before the task is executed.
http_server_props_manager_->ShutdownOnUIThread();
// Run the task after shutdown, but before deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
http_server_props_manager_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
//
@@ -415,7 +415,7 @@ TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdatePrefs0) {
http_server_props_manager_->ShutdownOnUIThread();
http_server_props_manager_.reset();
// Run the task after shutdown and deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdatePrefs1) {
@@ -425,10 +425,10 @@ TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdatePrefs1) {
// Shutdown comes before the task is executed.
http_server_props_manager_->ShutdownOnUIThread();
// Run the task after shutdown, but before deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
http_server_props_manager_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdatePrefs2) {
@@ -437,10 +437,10 @@ TEST_F(HttpServerPropertiesManagerTest, ShutdownWithPendingUpdatePrefs2) {
// Shutdown comes before the task is executed.
http_server_props_manager_->ShutdownOnUIThread();
// Run the task after shutdown, but before deletion.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
http_server_props_manager_.reset();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
} // namespace
« no previous file with comments | « chrome/browser/net/http_pipelining_compatibility_client_unittest.cc ('k') | chrome/browser/net/network_stats_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698