Index: chrome/browser/net/pref_proxy_config_service_unittest.cc |
diff --git a/chrome/browser/net/pref_proxy_config_service_unittest.cc b/chrome/browser/net/pref_proxy_config_service_unittest.cc |
index cc602ec490ed606225b4b8aec5f92e91a1f2ac2a..324a0be45ddbeb9ebcd9745e53bd3b60daf6b7d9 100644 |
--- a/chrome/browser/net/pref_proxy_config_service_unittest.cc |
+++ b/chrome/browser/net/pref_proxy_config_service_unittest.cc |
@@ -8,6 +8,7 @@ |
#include "base/file_path.h" |
#include "chrome/browser/net/chrome_url_request_context.h" |
#include "chrome/browser/prefs/pref_service_mock_builder.h" |
+#include "chrome/browser/prefs/proxy_prefs.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/test/testing_pref_service.h" |
@@ -114,6 +115,9 @@ TEST_F(PrefProxyConfigServiceTest, BaseConfiguration) { |
TEST_F(PrefProxyConfigServiceTest, DynamicPrefOverrides) { |
pref_service_->SetManagedPref( |
prefs::kProxyServer, Value::CreateStringValue("http://example.com:3128")); |
+ pref_service_->SetManagedPref( |
+ prefs::kProxyServerMode, |
+ Value::CreateIntegerValue(ProxyPrefs::MANUAL)); |
loop_.RunAllPending(); |
net::ProxyConfig actual_config; |
@@ -126,7 +130,8 @@ TEST_F(PrefProxyConfigServiceTest, DynamicPrefOverrides) { |
net::ProxyServer::SCHEME_HTTP)); |
pref_service_->SetManagedPref( |
- prefs::kProxyAutoDetect, Value::CreateBooleanValue(true)); |
+ prefs::kProxyServerMode, |
+ Value::CreateIntegerValue(ProxyPrefs::AUTO_DETECT)); |
loop_.RunAllPending(); |
proxy_config_service_->GetLatestProxyConfig(&actual_config); |
@@ -140,7 +145,10 @@ MATCHER_P(ProxyConfigMatches, config, "") { |
return reference.Equals(arg); |
} |
-TEST_F(PrefProxyConfigServiceTest, Observers) { |
+// TODO(battre): Enable this test when http://crbug.com/65732 is fixed. (Move |
+// proxy preferences into a dictionary.) The problem is that currently the |
+// observer gets fired twice, because two preferences are set. |
danno
2010/12/17 14:21:11
Reactivate this test (even though it tests double
gfeher
2010/12/17 15:44:17
Done.
|
+TEST_F(PrefProxyConfigServiceTest, DISABLED_Observers) { |
MockObserver observer; |
proxy_config_service_->AddObserver(&observer); |
@@ -160,6 +168,9 @@ TEST_F(PrefProxyConfigServiceTest, Observers) { |
OnProxyConfigChanged(ProxyConfigMatches(pref_config))).Times(1); |
pref_service_->SetManagedPref(prefs::kProxyPacUrl, |
Value::CreateStringValue(kFixedPacUrl)); |
+ pref_service_->SetManagedPref( |
+ prefs::kProxyServerMode, |
+ Value::CreateIntegerValue(ProxyPrefs::MANUAL)); |
loop_.RunAllPending(); |
Mock::VerifyAndClearExpectations(&observer); |