| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/browser.h" | 5 #include "chrome/browser/browser.h" | 
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" | 
| 7 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" | 
| 8 #include "chrome/browser/profile.h" |  | 
| 9 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" | 
| 10 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" | 
| 11 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" | 
| 12 | 11 | 
| 13 // Tests setting a single proxy to cover all schemes. | 12 // Tests setting a single proxy to cover all schemes. | 
| 14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxySingle) { | 13 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxySingle) { | 
| 15   CommandLine::ForCurrentProcess()->AppendSwitch( | 14   CommandLine::ForCurrentProcess()->AppendSwitch( | 
| 16       switches::kEnableExperimentalExtensionApis); | 15       switches::kEnableExperimentalExtensionApis); | 
| 17 | 16 | 
| 18   ASSERT_TRUE(RunExtensionTest("proxy/single")) << message_; | 17   ASSERT_TRUE(RunExtensionTest("proxy/single")) << message_; | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 42   PrefService* pref_service = browser()->profile()->GetPrefs(); | 41   PrefService* pref_service = browser()->profile()->GetPrefs(); | 
| 43 | 42 | 
| 44   // There should be no values superseding the extension-set proxy in this test. | 43   // There should be no values superseding the extension-set proxy in this test. | 
| 45   std::string proxy_server = pref_service->GetString(prefs::kProxyServer); | 44   std::string proxy_server = pref_service->GetString(prefs::kProxyServer); | 
| 46 | 45 | 
| 47   ASSERT_EQ("http=http://1.1.1.1;" | 46   ASSERT_EQ("http=http://1.1.1.1;" | 
| 48             "https=socks://2.2.2.2;" | 47             "https=socks://2.2.2.2;" | 
| 49             "ftp=http://3.3.3.3:9000;" | 48             "ftp=http://3.3.3.3:9000;" | 
| 50             "socks=socks4://4.4.4.4:9090", proxy_server); | 49             "socks=socks4://4.4.4.4:9090", proxy_server); | 
| 51 } | 50 } | 
| OLD | NEW | 
|---|