| 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/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 11 | 11 |
| 12 // Tests setting a single proxy to cover all schemes. | 12 // Tests setting a single proxy to cover all schemes. |
| 13 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxySingle) { | 13 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProxySingle) { |
| 14 CommandLine::ForCurrentProcess()->AppendSwitch( | 14 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 15 switches::kEnableExperimentalExtensionApis); | 15 switches::kEnableExperimentalExtensionApis); |
| 16 | 16 |
| 17 ASSERT_TRUE(RunExtensionTest("proxy/single")) << message_; | 17 ASSERT_TRUE(RunExtensionTest("proxy/single")) << message_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 41 PrefService* pref_service = browser()->profile()->GetPrefs(); | 41 PrefService* pref_service = browser()->profile()->GetPrefs(); |
| 42 | 42 |
| 43 // 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. |
| 44 std::string proxy_server = pref_service->GetString(prefs::kProxyServer); | 44 std::string proxy_server = pref_service->GetString(prefs::kProxyServer); |
| 45 | 45 |
| 46 ASSERT_EQ("http=http://1.1.1.1;" | 46 ASSERT_EQ("http=http://1.1.1.1;" |
| 47 "https=socks://2.2.2.2;" | 47 "https=socks://2.2.2.2;" |
| 48 "ftp=http://3.3.3.3:9000;" | 48 "ftp=http://3.3.3.3:9000;" |
| 49 "socks=socks4://4.4.4.4:9090", proxy_server); | 49 "socks=socks4://4.4.4.4:9090", proxy_server); |
| 50 } | 50 } |
| OLD | NEW |