Index: net/http/http_proxy_client_socket_pool_spdy2_unittest.cc |
=================================================================== |
--- net/http/http_proxy_client_socket_pool_spdy2_unittest.cc (revision 124690) |
+++ net/http/http_proxy_client_socket_pool_spdy2_unittest.cc (working copy) |
@@ -21,9 +21,11 @@ |
#include "net/socket/client_socket_pool_histograms.h" |
#include "net/socket/socket_test_util.h" |
#include "net/spdy/spdy_protocol.h" |
-#include "net/spdy/spdy_test_util.h" |
+#include "net/spdy/spdy_test_util_spdy2.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+using namespace net::test_spdy2; |
+ |
namespace net { |
namespace { |
@@ -45,9 +47,9 @@ |
} // namespace |
-class HttpProxyClientSocketPoolTest : public TestWithHttpParam { |
+class HttpProxyClientSocketPoolSpdy2Test : public TestWithHttpParam { |
protected: |
- HttpProxyClientSocketPoolTest() |
+ HttpProxyClientSocketPoolSpdy2Test() |
: ssl_config_(), |
ignored_transport_socket_params_(new TransportSocketParams( |
HostPortPair("proxy", 80), LOWEST, false, false)), |
@@ -91,7 +93,7 @@ |
NULL) { |
} |
- virtual ~HttpProxyClientSocketPoolTest() { |
+ virtual ~HttpProxyClientSocketPoolSpdy2Test() { |
} |
void AddAuthToCache() { |
@@ -173,7 +175,7 @@ |
void InitializeSpdySsl() { |
spdy::SpdyFramer::set_enable_compression_default(false); |
- ssl_data_->SetNextProto(SSLClientSocket::kProtoSPDY21); |
+ ssl_data_->SetNextProto(SSLClientSocket::kProtoSPDY2); |
} |
HttpNetworkSession* CreateNetworkSession() { |
@@ -219,11 +221,11 @@ |
//----------------------------------------------------------------------------- |
// All tests are run with three different proxy types: HTTP, HTTPS (non-SPDY) |
// and SPDY. |
-INSTANTIATE_TEST_CASE_P(HttpProxyClientSocketPoolTests, |
- HttpProxyClientSocketPoolTest, |
+INSTANTIATE_TEST_CASE_P(HttpProxyClientSocketPoolSpdy2Tests, |
+ HttpProxyClientSocketPoolSpdy2Test, |
::testing::Values(HTTP, HTTPS, SPDY)); |
-TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, NoTunnel) { |
Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0); |
int rv = handle_.Init("a", GetNoTunnelParams(), LOW, CompletionCallback(), |
@@ -236,7 +238,7 @@ |
EXPECT_TRUE(tunnel_socket->IsConnected()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, NeedAuth) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, NeedAuth) { |
MockWrite writes[] = { |
MockWrite(ASYNC, 0, "CONNECT www.google.com:443 HTTP/1.1\r\n" |
"Host: www.google.com\r\n" |
@@ -304,7 +306,7 @@ |
} |
} |
-TEST_P(HttpProxyClientSocketPoolTest, HaveAuth) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, HaveAuth) { |
// It's pretty much impossible to make the SPDY case behave synchronously |
// so we skip this test for SPDY |
if (GetParam() == SPDY) |
@@ -334,7 +336,7 @@ |
EXPECT_TRUE(tunnel_socket->IsConnected()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, AsyncHaveAuth) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, AsyncHaveAuth) { |
MockWrite writes[] = { |
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n" |
"Host: www.google.com\r\n" |
@@ -376,7 +378,7 @@ |
EXPECT_TRUE(tunnel_socket->IsConnected()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, TCPError) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, TCPError) { |
if (GetParam() == SPDY) return; |
data_ = new DeterministicSocketData(NULL, 0, NULL, 0); |
data_->set_connect_data(MockConnect(ASYNC, ERR_CONNECTION_CLOSED)); |
@@ -395,7 +397,7 @@ |
EXPECT_FALSE(handle_.socket()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, SSLError) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, SSLError) { |
if (GetParam() == HTTP) return; |
data_ = new DeterministicSocketData(NULL, 0, NULL, 0); |
data_->set_connect_data(MockConnect(ASYNC, OK)); |
@@ -420,7 +422,7 @@ |
EXPECT_FALSE(handle_.socket()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, SslClientAuth) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, SslClientAuth) { |
if (GetParam() == HTTP) return; |
data_ = new DeterministicSocketData(NULL, 0, NULL, 0); |
data_->set_connect_data(MockConnect(ASYNC, OK)); |
@@ -445,7 +447,7 @@ |
EXPECT_FALSE(handle_.socket()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, TunnelUnexpectedClose) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, TunnelUnexpectedClose) { |
MockWrite writes[] = { |
MockWrite(ASYNC, 0, |
"CONNECT www.google.com:443 HTTP/1.1\r\n" |
@@ -483,7 +485,7 @@ |
EXPECT_FALSE(handle_.socket()); |
} |
-TEST_P(HttpProxyClientSocketPoolTest, TunnelSetupError) { |
+TEST_P(HttpProxyClientSocketPoolSpdy2Test, TunnelSetupError) { |
MockWrite writes[] = { |
MockWrite(ASYNC, 0, |
"CONNECT www.google.com:443 HTTP/1.1\r\n" |