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

Side by Side Diff: net/spdy/spdy_session_unittest.cc

Issue 3197018: Refactor: change the spdy session pool key to take a ProxyServer instead of a stri... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_io_buffer.h" 5 #include "net/spdy/spdy_io_buffer.h"
6 #include "net/spdy/spdy_session.h" 6 #include "net/spdy/spdy_session.h"
7 #include "net/spdy/spdy_stream.h" 7 #include "net/spdy/spdy_stream.h"
8 #include "net/spdy/spdy_test_util.h" 8 #include "net/spdy/spdy_test_util.h"
9 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 SSLSocketDataProvider ssl(false, OK); 74 SSLSocketDataProvider ssl(false, OK);
75 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl); 75 session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
76 76
77 scoped_refptr<HttpNetworkSession> http_session( 77 scoped_refptr<HttpNetworkSession> http_session(
78 SpdySessionDependencies::SpdyCreateSession(&session_deps)); 78 SpdySessionDependencies::SpdyCreateSession(&session_deps));
79 79
80 const std::string kTestHost("www.foo.com"); 80 const std::string kTestHost("www.foo.com");
81 const int kTestPort = 80; 81 const int kTestPort = 80;
82 HostPortPair test_host_port_pair(kTestHost, kTestPort); 82 HostPortPair test_host_port_pair(kTestHost, kTestPort);
83 HostPortProxyPair pair(test_host_port_pair, ""); 83 HostPortProxyPair pair(test_host_port_pair, ProxyServer::Direct());
84 84
85 scoped_refptr<SpdySessionPool> spdy_session_pool( 85 scoped_refptr<SpdySessionPool> spdy_session_pool(
86 http_session->spdy_session_pool()); 86 http_session->spdy_session_pool());
87 EXPECT_FALSE(spdy_session_pool->HasSession(pair)); 87 EXPECT_FALSE(spdy_session_pool->HasSession(pair));
88 scoped_refptr<SpdySession> session = 88 scoped_refptr<SpdySession> session =
89 spdy_session_pool->Get(pair, http_session.get(), BoundNetLog()); 89 spdy_session_pool->Get(pair, http_session.get(), BoundNetLog());
90 EXPECT_TRUE(spdy_session_pool->HasSession(pair)); 90 EXPECT_TRUE(spdy_session_pool->HasSession(pair));
91 91
92 scoped_refptr<TCPSocketParams> tcp_params = 92 scoped_refptr<TCPSocketParams> tcp_params =
93 new TCPSocketParams(kTestHost, kTestPort, MEDIUM, GURL(), false); 93 new TCPSocketParams(kTestHost, kTestPort, MEDIUM, GURL(), false);
(...skipping 11 matching lines...) Expand all
105 // Delete the first session. 105 // Delete the first session.
106 session = NULL; 106 session = NULL;
107 107
108 // Delete the second session. 108 // Delete the second session.
109 spdy_session_pool->Remove(session2); 109 spdy_session_pool->Remove(session2);
110 session2 = NULL; 110 session2 = NULL;
111 } 111 }
112 112
113 } // namespace 113 } // namespace
114 } // namespace net 114 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698