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

Unified Diff: net/spdy/spdy_session_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/spdy/spdy_session_unittest.cc
===================================================================
--- net/spdy/spdy_session_unittest.cc (revision 92397)
+++ net/spdy/spdy_session_unittest.cc (working copy)
@@ -417,8 +417,8 @@
std::string iplist;
HostPortProxyPair pair;
} test_hosts[] = {
- { "www.foo.com", "192.168.0.1,192.168.0.5" },
- { "images.foo.com", "192.168.0.2,192.168.0.3,192.168.0.5" },
+ { "www.foo.com", "192.0.2.33,192.168.0.1,192.168.0.5" },
+ { "images.foo.com", "192.168.0.2,192.168.0.3,192.168.0.5,192.0.2.33" },
{ "js.foo.com", "192.168.0.4,192.168.0.3" },
};
@@ -477,6 +477,12 @@
BoundNetLog()));
EXPECT_EQ(OK, session->InitializeWithSocket(connection.release(), false, OK));
+ // MockClientSocket::GetPeerAddress return's 0 as the port number for the
+ // host. HasSession looks up addresses with port 80. AddAliases adds addresses
+ // with port 80 into session_pool's aliases for |test_hosts[0].pair|.
+ SpdySessionPoolPeer pool_peer(spdy_session_pool);
+ pool_peer.AddAliases(test_hosts[0].pair);
willchan no longer on Chromium 2011/07/17 12:44:47 Sorry, I wasn't clear. I'd prefer you just do AddA
ramant (doing other things) 2011/07/17 19:45:34 Done.
+
// Flush the SpdySession::OnReadComplete() task.
MessageLoop::current()->RunAllPending();

Powered by Google App Engine
This is Rietveld 408576698