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

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

Issue 1783008: Cleanup: Remove the implicit constructor for BoundNetLog that allowed passing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Sync Created 10 years, 7 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.cc ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 6
7 #include "googleurl/src/gurl.h" 7 #include "googleurl/src/gurl.h"
8 #include "net/base/mock_host_resolver.h" 8 #include "net/base/mock_host_resolver.h"
9 #include "net/base/ssl_config_service_defaults.h" 9 #include "net/base/ssl_config_service_defaults.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 test_host_port_pair.port = kTestPort; 120 test_host_port_pair.port = kTestPort;
121 121
122 scoped_refptr<SpdySessionPool> spdy_session_pool( 122 scoped_refptr<SpdySessionPool> spdy_session_pool(
123 http_session->spdy_session_pool()); 123 http_session->spdy_session_pool());
124 EXPECT_FALSE(spdy_session_pool->HasSession(test_host_port_pair)); 124 EXPECT_FALSE(spdy_session_pool->HasSession(test_host_port_pair));
125 scoped_refptr<SpdySession> session = 125 scoped_refptr<SpdySession> session =
126 spdy_session_pool->Get(test_host_port_pair, http_session.get()); 126 spdy_session_pool->Get(test_host_port_pair, http_session.get());
127 EXPECT_TRUE(spdy_session_pool->HasSession(test_host_port_pair)); 127 EXPECT_TRUE(spdy_session_pool->HasSession(test_host_port_pair));
128 128
129 TCPSocketParams tcp_params(kTestHost, kTestPort, MEDIUM, GURL(), false); 129 TCPSocketParams tcp_params(kTestHost, kTestPort, MEDIUM, GURL(), false);
130 int rv = session->Connect(kTestHost, tcp_params, MEDIUM, NULL); 130 int rv = session->Connect(kTestHost, tcp_params, MEDIUM, BoundNetLog());
131 ASSERT_EQ(OK, rv); 131 ASSERT_EQ(OK, rv);
132 132
133 // Flush the SpdySession::OnReadComplete() task. 133 // Flush the SpdySession::OnReadComplete() task.
134 MessageLoop::current()->RunAllPending(); 134 MessageLoop::current()->RunAllPending();
135 135
136 EXPECT_FALSE(spdy_session_pool->HasSession(test_host_port_pair)); 136 EXPECT_FALSE(spdy_session_pool->HasSession(test_host_port_pair));
137 137
138 scoped_refptr<SpdySession> session2 = 138 scoped_refptr<SpdySession> session2 =
139 spdy_session_pool->Get(test_host_port_pair, http_session.get()); 139 spdy_session_pool->Get(test_host_port_pair, http_session.get());
140 140
141 // Delete the first session. 141 // Delete the first session.
142 session = NULL; 142 session = NULL;
143 143
144 // Delete the second session. 144 // Delete the second session.
145 spdy_session_pool->Remove(session2); 145 spdy_session_pool->Remove(session2);
146 session2 = NULL; 146 session2 = NULL;
147 } 147 }
148 148
149 } // namespace 149 } // namespace
150 150
151 } // namespace net 151 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698