Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Side by Side Diff: net/proxy/proxy_config_service_win_unittest.cc

Issue 3388021: Change the meaning of the command-line flag --proxy-server="socks://foo" to i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/resources/manpage.1.in ('k') | net/proxy/proxy_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "net/proxy/proxy_config_service_win.h" 5 #include "net/proxy/proxy_config_service_win.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/proxy/proxy_config.h" 8 #include "net/proxy/proxy_config.h"
9 #include "net/proxy/proxy_config_service_common_unittest.h" 9 #include "net/proxy/proxy_config_service_common_unittest.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Expected result. 96 // Expected result.
97 false, // auto_detect 97 false, // auto_detect
98 GURL(), // pac_url 98 GURL(), // pac_url
99 ProxyRulesExpectation::PerScheme( 99 ProxyRulesExpectation::PerScheme(
100 "www.google.com:80", // http 100 "www.google.com:80", // http
101 "www.foo.com:110", // https 101 "www.foo.com:110", // https
102 "", // ftp 102 "", // ftp
103 ""), // bypass rules 103 ""), // bypass rules
104 }, 104 },
105 105
106 // SOCKS proxy configuration 106 // SOCKS proxy configuration.
107 { 107 {
108 { // Input. 108 { // Input.
109 FALSE, // fAutoDetect 109 FALSE, // fAutoDetect
110 NULL, // lpszAutoConfigUrl 110 NULL, // lpszAutoConfigUrl
111 L"http=www.google.com:80;https=www.foo.com:110;" 111 L"http=www.google.com:80;https=www.foo.com:110;"
112 L"ftp=ftpproxy:20;socks=foopy:130", // lpszProxy 112 L"ftp=ftpproxy:20;socks=foopy:130", // lpszProxy
113 NULL, // lpszProxy_bypass 113 NULL, // lpszProxy_bypass
114 }, 114 },
115 115
116 // Expected result. 116 // Expected result.
117 // Note that "socks" is interprted as meaning "socks4", since that is how
118 // Internet Explorer applies the settings. For more details on this
119 // policy, see:
120 // http://code.google.com/p/chromium/issues/detail?id=55912#c2
117 false, // auto_detect 121 false, // auto_detect
118 GURL(), // pac_url 122 GURL(), // pac_url
119 ProxyRulesExpectation::PerSchemeWithSocks( 123 ProxyRulesExpectation::PerSchemeWithSocks(
120 "www.google.com:80", // http 124 "www.google.com:80", // http
121 "www.foo.com:110", // https 125 "www.foo.com:110", // https
122 "ftpproxy:20", // ftp 126 "ftpproxy:20", // ftp
123 "socks4://foopy:130", // socks 127 "socks4://foopy:130", // socks
124 ""), // bypass rules 128 ""), // bypass rules
125 }, 129 },
126 130
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ProxyConfig config; 178 ProxyConfig config;
175 ProxyConfigServiceWin::SetFromIEConfig(&config, tests[i].ie_config); 179 ProxyConfigServiceWin::SetFromIEConfig(&config, tests[i].ie_config);
176 180
177 EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); 181 EXPECT_EQ(tests[i].auto_detect, config.auto_detect());
178 EXPECT_EQ(tests[i].pac_url, config.pac_url()); 182 EXPECT_EQ(tests[i].pac_url, config.pac_url());
179 EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); 183 EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules()));
180 } 184 }
181 } 185 }
182 186
183 } // namespace net 187 } // namespace net
OLDNEW
« no previous file with comments | « chrome/app/resources/manpage.1.in ('k') | net/proxy/proxy_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698