diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 17:55:53 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 17:55:53 +0000 |
commit | 224c0ad4d0d66825b957812a06c0e65d8d811ea7 (patch) | |
tree | ac7a516901cb9ae31fcf373e5ae1520a4b3e1b71 /net/proxy/proxy_server_unittest.cc | |
parent | 7b92c41ccc32a7b8a9a439a9a2a45d635a8d9caf (diff) | |
download | chromium_src-224c0ad4d0d66825b957812a06c0e65d8d811ea7.zip chromium_src-224c0ad4d0d66825b957812a06c0e65d8d811ea7.tar.gz chromium_src-224c0ad4d0d66825b957812a06c0e65d8d811ea7.tar.bz2 |
Add some plumbing for in-progress work on enabling SSL proxy support.
BUG=29625
TEST=none
Review URL: http://codereview.chromium.org/2832057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_server_unittest.cc')
-rw-r--r-- | net/proxy/proxy_server_unittest.cc | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/net/proxy/proxy_server_unittest.cc b/net/proxy/proxy_server_unittest.cc index 0b06152..f91ad66 100644 --- a/net/proxy/proxy_server_unittest.cc +++ b/net/proxy/proxy_server_unittest.cc @@ -145,6 +145,35 @@ TEST(ProxyServerTest, FromURI) { "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 @@ TEST(ProxyServerTest, Invalid) { "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 @@ TEST(ProxyServerTest, FromPACString) { " 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, FromPACString) { 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. }; |