OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 7 #include "chrome/browser/prefs/proxy_config_dictionary.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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 // Tests setting separate proxies for each scheme. | 159 // Tests setting separate proxies for each scheme. |
160 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedIndividual) { | 160 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedIndividual) { |
161 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual")) << message_; | 161 ASSERT_TRUE(RunExtensionTestIncognito("proxy/individual")) << message_; |
162 const Extension* extension = GetSingleLoadedExtension(); | 162 const Extension* extension = GetSingleLoadedExtension(); |
163 ASSERT_TRUE(extension); | 163 ASSERT_TRUE(extension); |
164 | 164 |
165 PrefService* pref_service = browser()->profile()->GetPrefs(); | 165 PrefService* pref_service = browser()->profile()->GetPrefs(); |
166 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, | 166 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, |
167 "http=1.1.1.1:80;" // http:// is pruned. | 167 "http=quic://1.1.1.1:443;" |
168 "https=2.2.2.2:80;" // http:// is pruned. | 168 "https=2.2.2.2:80;" // http:// is pruned. |
169 "ftp=3.3.3.3:9000;" // http:// is pruned. | 169 "ftp=3.3.3.3:9000;" // http:// is pruned. |
170 "socks=socks4://4.4.4.4:9090", | 170 "socks=socks4://4.4.4.4:9090", |
171 kNoBypass, | 171 kNoBypass, |
172 kNoPac, | 172 kNoPac, |
173 pref_service); | 173 pref_service); |
174 | 174 |
175 // Now check the incognito preferences. | 175 // Now check the incognito preferences. |
176 pref_service = browser()->profile()->GetOffTheRecordProfile()->GetPrefs(); | 176 pref_service = browser()->profile()->GetOffTheRecordProfile()->GetPrefs(); |
177 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, | 177 ValidateSettings(ProxyPrefs::MODE_FIXED_SERVERS, |
178 "http=1.1.1.1:80;" | 178 "http=quic://1.1.1.1:443;" |
179 "https=2.2.2.2:80;" | 179 "https=2.2.2.2:80;" |
180 "ftp=3.3.3.3:9000;" | 180 "ftp=3.3.3.3:9000;" |
181 "socks=socks4://4.4.4.4:9090", | 181 "socks=socks4://4.4.4.4:9090", |
182 kNoBypass, | 182 kNoBypass, |
183 kNoPac, | 183 kNoPac, |
184 pref_service); | 184 pref_service); |
185 } | 185 } |
186 | 186 |
187 // Tests setting values only for incognito mode | 187 // Tests setting values only for incognito mode |
188 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, | 188 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 RunExtensionSubtest("proxy/events", "invalid_proxy.html")) << message_; | 288 RunExtensionSubtest("proxy/events", "invalid_proxy.html")) << message_; |
289 } | 289 } |
290 | 290 |
291 // Tests error events: PAC script parse error. | 291 // Tests error events: PAC script parse error. |
292 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEventsParseError) { | 292 IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEventsParseError) { |
293 ASSERT_TRUE( | 293 ASSERT_TRUE( |
294 RunExtensionSubtest("proxy/events", "parse_error.html")) << message_; | 294 RunExtensionSubtest("proxy/events", "parse_error.html")) << message_; |
295 } | 295 } |
296 | 296 |
297 } // namespace extensions | 297 } // namespace extensions |
OLD | NEW |