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/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
6 #include "chrome/browser/prefs/pref_service.h" | 6 #include "chrome/browser/prefs/pref_service.h" |
7 #include "chrome/browser/prefs/proxy_prefs.h" | 7 #include "chrome/browser/prefs/proxy_prefs.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedSingle) { | 110 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedSingle) { |
111 CommandLine::ForCurrentProcess()->AppendSwitch( | 111 CommandLine::ForCurrentProcess()->AppendSwitch( |
112 switches::kEnableExperimentalExtensionApis); | 112 switches::kEnableExperimentalExtensionApis); |
113 | 113 |
114 ASSERT_TRUE(RunExtensionTest("proxy/single")) << message_; | 114 ASSERT_TRUE(RunExtensionTest("proxy/single")) << message_; |
115 const Extension* extension = GetSingleLoadedExtension(); | 115 const Extension* extension = GetSingleLoadedExtension(); |
116 ASSERT_TRUE(extension); | 116 ASSERT_TRUE(extension); |
117 | 117 |
118 PrefService* pref_service = browser()->profile()->GetPrefs(); | 118 PrefService* pref_service = browser()->profile()->GetPrefs(); |
119 ExpectSettings(ProxyPrefs::MODE_FIXED_SERVERS, | 119 ExpectSettings(ProxyPrefs::MODE_FIXED_SERVERS, |
120 "http=http://127.0.0.1:100;" | 120 "127.0.0.1:100", |
121 "https=http://127.0.0.1:100;" | |
122 "ftp=http://127.0.0.1:100;" | |
123 "socks=http://9.9.9.9", | |
124 kNoPac, | 121 kNoPac, |
125 pref_service); | 122 pref_service); |
126 } | 123 } |
127 | 124 |
128 // Tests setting to use the system's proxy settings. | 125 // Tests setting to use the system's proxy settings. |
129 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxySystem) { | 126 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxySystem) { |
130 CommandLine::ForCurrentProcess()->AppendSwitch( | 127 CommandLine::ForCurrentProcess()->AppendSwitch( |
131 switches::kEnableExperimentalExtensionApis); | 128 switches::kEnableExperimentalExtensionApis); |
132 | 129 |
133 ASSERT_TRUE(RunExtensionTest("proxy/system")) << message_; | 130 ASSERT_TRUE(RunExtensionTest("proxy/system")) << message_; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 CommandLine::ForCurrentProcess()->AppendSwitch( | 223 CommandLine::ForCurrentProcess()->AppendSwitch( |
227 switches::kEnableExperimentalExtensionApis); | 224 switches::kEnableExperimentalExtensionApis); |
228 | 225 |
229 ASSERT_TRUE(RunExtensionTest("proxy/individual_remove")) << message_; | 226 ASSERT_TRUE(RunExtensionTest("proxy/individual_remove")) << message_; |
230 const Extension* extension = GetSingleLoadedExtension(); | 227 const Extension* extension = GetSingleLoadedExtension(); |
231 ASSERT_TRUE(extension); | 228 ASSERT_TRUE(extension); |
232 | 229 |
233 PrefService* pref_service = browser()->profile()->GetPrefs(); | 230 PrefService* pref_service = browser()->profile()->GetPrefs(); |
234 ExpectNoSettings(pref_service); | 231 ExpectNoSettings(pref_service); |
235 } | 232 } |
OLD | NEW |