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

Unified Diff: net/socket/ssl_client_socket_pool_unittest.cc

Issue 9252029: SPDY - default to SPDY/2.1 protocol in unittests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync with trunk Created 8 years, 11 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/http/http_stream_factory_impl.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_pool_unittest.cc
===================================================================
--- net/socket/ssl_client_socket_pool_unittest.cc (revision 119306)
+++ net/socket/ssl_client_socket_pool_unittest.cc (working copy)
@@ -373,8 +373,8 @@
socket_factory_.AddSocketDataProvider(&data);
SSLSocketDataProvider ssl(true, OK);
ssl.next_proto_status = SSLClientSocket::kNextProtoNegotiated;
- ssl.next_proto = "spdy/2";
- ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2;
+ ssl.next_proto = "spdy/2.1";
+ ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY21;
socket_factory_.AddSSLSocketDataProvider(&ssl);
CreatePool(true /* tcp pool */, false, false);
@@ -399,7 +399,7 @@
std::string server_protos;
ssl_socket->GetNextProto(&proto, &server_protos);
EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto),
- SSLClientSocket::kProtoSPDY2);
+ SSLClientSocket::kProtoSPDY21);
}
TEST_F(SSLClientSocketPoolTest, DirectGotBonusSPDY) {
@@ -407,8 +407,8 @@
socket_factory_.AddSocketDataProvider(&data);
SSLSocketDataProvider ssl(true, OK);
ssl.next_proto_status = SSLClientSocket::kNextProtoNegotiated;
- ssl.next_proto = "spdy/2";
- ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2;
+ ssl.next_proto = "spdy/2.1";
+ ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY21;
socket_factory_.AddSSLSocketDataProvider(&ssl);
CreatePool(true /* tcp pool */, false, false);
@@ -433,7 +433,7 @@
std::string server_protos;
ssl_socket->GetNextProto(&proto, &server_protos);
EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto),
- SSLClientSocket::kProtoSPDY2);
+ SSLClientSocket::kProtoSPDY21);
}
TEST_F(SSLClientSocketPoolTest, SOCKSFail) {
@@ -709,8 +709,8 @@
ssl.cert = X509Certificate::CreateFromBytes(
reinterpret_cast<const char*>(webkit_der), sizeof(webkit_der));
ssl.next_proto_status = SSLClientSocket::kNextProtoNegotiated;
- ssl.next_proto = "spdy/2";
- ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2;
+ ssl.next_proto = "spdy/2.1";
+ ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY21;
socket_factory_.AddSSLSocketDataProvider(&ssl);
CreatePool(true /* tcp pool */, false, false);
@@ -735,7 +735,7 @@
std::string server_protos;
ssl_socket->GetNextProto(&proto, &server_protos);
EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto),
- SSLClientSocket::kProtoSPDY2);
+ SSLClientSocket::kProtoSPDY21);
// TODO(rtenneti): MockClientSocket::GetPeerAddress returns 0 as the port
// number. Fix it to return port 80 and then use GetPeerAddress to AddAlias.
@@ -797,9 +797,9 @@
ssl.cert = X509Certificate::CreateFromBytes(
reinterpret_cast<const char*>(webkit_der), sizeof(webkit_der));
ssl.next_proto_status = SSLClientSocket::kNextProtoNegotiated;
- ssl.next_proto = "spdy/2";
+ ssl.next_proto = "spdy/2.1";
ssl.client_cert_sent = true;
- ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY2;
+ ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY21;
socket_factory_.AddSSLSocketDataProvider(&ssl);
CreatePool(true /* tcp pool */, false, false);
@@ -823,7 +823,7 @@
std::string server_protos;
ssl_socket->GetNextProto(&proto, &server_protos);
EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto),
- SSLClientSocket::kProtoSPDY2);
+ SSLClientSocket::kProtoSPDY21);
// TODO(rtenneti): MockClientSocket::GetPeerAddress returns 0 as the port
// number. Fix it to return port 80 and then use GetPeerAddress to AddAlias.
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698