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

Unified Diff: net/proxy/proxy_server_unittest.cc

Issue 149191: Whenever proxy configurations contain socks and http/https/ftp proxies, socks... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: adding disabled win test Created 11 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
Index: net/proxy/proxy_server_unittest.cc
===================================================================
--- net/proxy/proxy_server_unittest.cc (revision 20189)
+++ net/proxy/proxy_server_unittest.cc (working copy)
@@ -148,7 +148,9 @@
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
- net::ProxyServer uri = net::ProxyServer::FromURI(tests[i].input_uri);
+ net::ProxyServer uri =
+ net::ProxyServer::FromURI(tests[i].input_uri,
+ net::ProxyServer::SCHEME_HTTP);
EXPECT_TRUE(uri.is_valid());
EXPECT_FALSE(uri.is_direct());
EXPECT_EQ(tests[i].expected_uri, uri.ToURI());
@@ -168,7 +170,8 @@
// Test parsing of the special URI form "direct://". Analagous to the "DIRECT"
// entry in a PAC result.
TEST(ProxyServerTest, Direct) {
- net::ProxyServer uri = net::ProxyServer::FromURI("direct://");
+ net::ProxyServer uri =
+ net::ProxyServer::FromURI("direct://", net::ProxyServer::SCHEME_HTTP);
EXPECT_TRUE(uri.is_valid());
EXPECT_TRUE(uri.is_direct());
EXPECT_EQ("direct://", uri.ToURI());
@@ -190,7 +193,8 @@
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
- net::ProxyServer uri = net::ProxyServer::FromURI(tests[i]);
+ net::ProxyServer uri =
+ net::ProxyServer::FromURI(tests[i], net::ProxyServer::SCHEME_HTTP);
EXPECT_FALSE(uri.is_valid());
EXPECT_FALSE(uri.is_direct());
EXPECT_FALSE(uri.is_http());
@@ -207,7 +211,8 @@
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
- net::ProxyServer uri = net::ProxyServer::FromURI(tests[i]);
+ net::ProxyServer uri =
+ net::ProxyServer::FromURI(tests[i], net::ProxyServer::SCHEME_HTTP);
EXPECT_EQ("foopy:80", uri.ToURI());
}
}

Powered by Google App Engine
This is Rietveld 408576698