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

Unified Diff: net/http/http_proxy_client_socket_pool_unittest.cc

Issue 4935001: Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS pro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/http/http_proxy_client_socket_pool_unittest.cc
===================================================================
--- net/http/http_proxy_client_socket_pool_unittest.cc (revision 68959)
+++ net/http/http_proxy_client_socket_pool_unittest.cc (working copy)
@@ -498,9 +498,18 @@
data_->RunFor(2);
- EXPECT_EQ(ERR_TUNNEL_CONNECTION_FAILED, callback_.WaitForResult());
- EXPECT_FALSE(handle_.is_initialized());
- EXPECT_FALSE(handle_.socket());
+ rv = callback_.WaitForResult();
+ if (GetParam() == HTTP) {
+ // HTTP Proxy CONNECT responses are not trustworthy
+ EXPECT_EQ(ERR_TUNNEL_CONNECTION_FAILED, rv);
+ EXPECT_FALSE(handle_.is_initialized());
+ EXPECT_FALSE(handle_.socket());
+ } else {
+ // HTTPS or SPDY Proxy CONNECT responses are trustworthy
+ EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv);
+ EXPECT_TRUE(handle_.is_initialized());
+ EXPECT_TRUE(handle_.socket());
+ }
}
// It would be nice to also test the timeouts in HttpProxyClientSocketPool.

Powered by Google App Engine
This is Rietveld 408576698