Index: chrome/browser/extensions/extension_proxy_apitest.cc |
diff --git a/chrome/browser/extensions/extension_proxy_apitest.cc b/chrome/browser/extensions/extension_proxy_apitest.cc |
index f24b7ef5689474a45935bb6fc2f88222e5fafa3f..5b6ef8d1f787593ec3c92fd1c763f77a344f8889 100644 |
--- a/chrome/browser/extensions/extension_proxy_apitest.cc |
+++ b/chrome/browser/extensions/extension_proxy_apitest.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "chrome/browser/extensions/extension_apitest.h" |
+#include "chrome/browser/net/pref_proxy_config_service.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
@@ -22,11 +23,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxyAutoSettings) { |
PrefService* pref_service = browser()->profile()->GetPrefs(); |
const PrefService::Preference* pref = |
- pref_service->FindPreference(prefs::kProxyAutoDetect); |
+ pref_service->FindPreference(prefs::kProxyServerMode); |
ASSERT_TRUE(pref != NULL); |
ASSERT_TRUE(pref->IsExtensionControlled()); |
- bool auto_detect = pref_service->GetBoolean(prefs::kProxyAutoDetect); |
- EXPECT_TRUE(auto_detect); |
+ int mode = pref_service->GetInteger(prefs::kProxyServerMode); |
+ EXPECT_EQ(PrefProxyConfigService::AUTO_DETECT, mode); |
pref = pref_service->FindPreference(prefs::kProxyPacUrl); |
ASSERT_TRUE(pref != NULL); |
@@ -53,21 +54,22 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxyManualSingle) { |
// There should be no values superseding the extension-set proxy in this test. |
const PrefService::Preference* pref = |
- pref_service->FindPreference(prefs::kProxyServer); |
+ pref_service->FindPreference(prefs::kProxyServer); |
ASSERT_TRUE(pref != NULL); |
ASSERT_TRUE(pref->IsExtensionControlled()); |
std::string proxy_server = pref_service->GetString(prefs::kProxyServer); |
EXPECT_EQ("http=http://127.0.0.1:100;" |
- "https=http://127.0.0.1:100;" |
- "ftp=http://127.0.0.1:100;" |
- "socks=http://9.9.9.9", proxy_server); |
+ "https=http://127.0.0.1:100;" |
+ "ftp=http://127.0.0.1:100;" |
+ "socks=http://9.9.9.9", proxy_server); |
battre (please use the other)
2010/12/14 09:45:44
Nit: Indentation broken
gfeher
2010/12/16 10:42:04
Done.
|
// Other proxy prefs should also be set, so they're all controlled from one |
// place. |
- pref = pref_service->FindPreference(prefs::kProxyAutoDetect); |
+ pref = pref_service->FindPreference(prefs::kProxyServerMode); |
ASSERT_TRUE(pref != NULL); |
EXPECT_TRUE(pref->IsExtensionControlled()); |
- EXPECT_FALSE(pref_service->GetBoolean(prefs::kProxyAutoDetect)); |
+ EXPECT_EQ(PrefProxyConfigService::MANUAL, |
+ pref_service->GetInteger(prefs::kProxyServerMode)); |
pref = pref_service->FindPreference(prefs::kProxyPacUrl); |
ASSERT_TRUE(pref != NULL); |
@@ -88,7 +90,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxyManualIndividual) { |
// There should be no values superseding the extension-set proxy in this test. |
const PrefService::Preference* pref = |
- pref_service->FindPreference(prefs::kProxyServer); |
+ pref_service->FindPreference(prefs::kProxyServer); |
ASSERT_TRUE(pref != NULL); |
ASSERT_TRUE(pref->IsExtensionControlled()); |
@@ -100,10 +102,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxyManualIndividual) { |
// Other proxy prefs should also be set, so they're all controlled from one |
// place. |
- pref = pref_service->FindPreference(prefs::kProxyAutoDetect); |
+ pref = pref_service->FindPreference(prefs::kProxyServerMode); |
ASSERT_TRUE(pref != NULL); |
EXPECT_TRUE(pref->IsExtensionControlled()); |
- EXPECT_FALSE(pref_service->GetBoolean(prefs::kProxyAutoDetect)); |
+ EXPECT_EQ(PrefProxyConfigService::MANUAL, |
+ pref_service->GetInteger(prefs::kProxyServerMode)); |
pref = pref_service->FindPreference(prefs::kProxyPacUrl); |
ASSERT_TRUE(pref != NULL); |