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

Unified Diff: chrome/browser/net/pref_proxy_config_tracker_impl_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/pref_proxy_config_tracker_impl_unittest.cc
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
index 03fcfeff33b3c61399b70252e436bdac110de174..aaa4a44e9dfdd00194fc5773e60cd641fd85d49c 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
@@ -92,12 +92,12 @@ class PrefProxyConfigTrackerImplTestBase : public TESTBASE {
// SetChromeProxyConfigService triggers update of initial prefs proxy
// config by tracker to chrome proxy config service, so flush all pending
// tasks so that tests start fresh.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
virtual void TearDown() {
proxy_config_tracker_->DetachFromPrefService();
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
proxy_config_tracker_.reset();
proxy_config_service_.reset();
}
@@ -135,7 +135,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, DynamicPrefOverrides) {
pref_service_->SetManagedPref(
prefs::kProxy,
ProxyConfigDictionary::CreateFixedServers("http://example.com:3128", ""));
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
net::ProxyConfig actual_config;
EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID,
@@ -149,7 +149,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, DynamicPrefOverrides) {
pref_service_->SetManagedPref(prefs::kProxy,
ProxyConfigDictionary::CreateAutoDetect());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID,
proxy_config_service_->GetLatestProxyConfig(&actual_config));
@@ -175,7 +175,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) {
EXPECT_CALL(observer, OnProxyConfigChanged(ProxyConfigMatches(config2),
CONFIG_VALID)).Times(1);
delegate_service_->SetProxyConfig(config2, CONFIG_VALID);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
// Override configuration, this should trigger a notification.
@@ -187,7 +187,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) {
pref_service_->SetManagedPref(
prefs::kProxy,
ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false));
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
// Since there are pref overrides, delegate changes should be ignored.
@@ -196,14 +196,14 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) {
EXPECT_CALL(observer, OnProxyConfigChanged(_, _)).Times(0);
fixed_config_.set_auto_detect(true);
delegate_service_->SetProxyConfig(config3, CONFIG_VALID);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
// Clear the override should switch back to the fixed configuration.
EXPECT_CALL(observer, OnProxyConfigChanged(ProxyConfigMatches(config3),
CONFIG_VALID)).Times(1);
pref_service_->RemoveManagedPref(prefs::kProxy);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
// Delegate service notifications should show up again.
@@ -212,7 +212,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) {
EXPECT_CALL(observer, OnProxyConfigChanged(ProxyConfigMatches(config4),
CONFIG_VALID)).Times(1);
delegate_service_->SetProxyConfig(config4, CONFIG_VALID);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
proxy_config_service_->RemoveObserver(&observer);
@@ -239,7 +239,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) {
pref_service_->SetRecommendedPref(
prefs::kProxy,
ProxyConfigDictionary::CreateAutoDetect());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
EXPECT_EQ(CONFIG_VALID,
proxy_config_service_->GetLatestProxyConfig(&actual_config));
@@ -252,7 +252,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) {
pref_service_->SetManagedPref(
prefs::kProxy,
ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false));
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
EXPECT_EQ(CONFIG_VALID,
proxy_config_service_->GetLatestProxyConfig(&actual_config));
@@ -263,7 +263,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) {
OnProxyConfigChanged(ProxyConfigMatches(recommended_config),
CONFIG_VALID)).Times(1);
pref_service_->RemoveManagedPref(prefs::kProxy);
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
EXPECT_EQ(CONFIG_VALID,
proxy_config_service_->GetLatestProxyConfig(&actual_config));
@@ -279,7 +279,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, ExplicitSystemSettings) {
pref_service_->SetUserPref(
prefs::kProxy,
ProxyConfigDictionary::CreateSystem());
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
// Test if we actually use the system setting, which is |kFixedPacUrl|.
net::ProxyConfig actual_config;
« no previous file with comments | « chrome/browser/net/predictor_unittest.cc ('k') | chrome/browser/net/ssl_config_service_manager_pref_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698