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

Unified Diff: net/socket/ssl_client_socket_pool_unittest.cc

Issue 7349023: Changed SPDY's ip connection pooling logic to only add the used IP, (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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/socket/ssl_client_socket_pool_unittest.cc
===================================================================
--- net/socket/ssl_client_socket_pool_unittest.cc (revision 92397)
+++ net/socket/ssl_client_socket_pool_unittest.cc (working copy)
@@ -26,6 +26,7 @@
#include "net/socket/socket_test_util.h"
#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_session_pool.h"
+#include "net/spdy/spdy_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
@@ -656,9 +657,9 @@
std::string iplist;
HostPortProxyPair pair;
} test_hosts[] = {
- { "www.webkit.org", "192.168.0.1,192.168.0.5" },
+ { "www.webkit.org", "192.0.2.33,192.168.0.1,192.168.0.5" },
{ "code.google.com", "192.168.0.2,192.168.0.3,192.168.0.5" },
- { "js.webkit.org", "192.168.0.4,192.168.0.5" },
+ { "js.webkit.org", "192.0.2.33,192.168.0.4,192.168.0.1" },
};
host_resolver_.set_synchronous_mode(true);
@@ -712,6 +713,12 @@
EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto),
SSLClientSocket::kProtoSPDY2);
+ // MockClientSocket::GetPeerAddress return's 0 as the port number and when we
+ // search for HasSession, we lookup with port 80. AddAliases adds addresses
+ // with port 80.
+ SpdySessionPoolPeer pool_peer(session_->spdy_session_pool());
+ pool_peer.AddAliases(test_hosts[0].pair);
+
scoped_refptr<SpdySession> spdy_session;
rv = session_->spdy_session_pool()->GetSpdySessionFromSocket(
test_hosts[0].pair, handle.release(), BoundNetLog(), 0,

Powered by Google App Engine
This is Rietveld 408576698