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

Unified Diff: net/proxy/proxy_server_unittest.cc

Issue 2832057: Add some plumbing for in-progress work on enabling SSL proxy support.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_server_unittest.cc
===================================================================
--- net/proxy/proxy_server_unittest.cc (revision 52951)
+++ net/proxy/proxy_server_unittest.cc (working copy)
@@ -145,6 +145,35 @@
"foopy:10",
"SOCKS foopy:10"
},
+
+ // HTTPS proxy URIs:
+ {
+ "https://foopy", // No port
+ "https://foopy:443",
+ net::ProxyServer::SCHEME_HTTPS,
+ "foopy",
+ 443,
+ "foopy:443",
+ "HTTPS foopy:443"
+ },
+ {
+ "https://foopy:10", // Non-standard port
+ "https://foopy:10",
+ net::ProxyServer::SCHEME_HTTPS,
+ "foopy",
+ 10,
+ "foopy:10",
+ "HTTPS foopy:10"
+ },
+ {
+ "https://1.2.3.4:10", // IP Address
+ "https://1.2.3.4:10",
+ net::ProxyServer::SCHEME_HTTPS,
+ "1.2.3.4",
+ 10,
+ "1.2.3.4:10",
+ "HTTPS 1.2.3.4:10"
+ },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
@@ -189,7 +218,6 @@
"direct://xyz", // direct is not allowed a host/port.
"http:/", // ambiguous, but will fail because of bad port.
"http:", // ambiguous, but will fail because of bad port.
- "https://blah", // "https" is not a valid proxy scheme.
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
@@ -259,6 +287,14 @@
" direct ",
"direct://",
},
+ {
+ "https foopy",
+ "https://foopy:443",
+ },
+ {
+ "https foopy:10",
+ "https://foopy:10",
+ },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
@@ -272,6 +308,7 @@
TEST(ProxyServerTest, FromPACStringInvalid) {
const char* tests[] = {
"PROXY", // missing host/port.
+ "HTTPS", // missing host/port.
"SOCKS", // missing host/port.
"DIRECT foopy:10", // direct cannot have host/port.
};
« no previous file with comments | « net/proxy/proxy_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698