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; |