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