OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "net/base/address_list.h" | 8 #include "net/base/address_list.h" |
9 #include "net/base/net_log.h" | 9 #include "net/base/net_log.h" |
10 #include "net/base/net_log_unittest.h" | 10 #include "net/base/net_log_unittest.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 // Creates a new spdy session | 177 // Creates a new spdy session |
178 spdy_session_ = | 178 spdy_session_ = |
179 session_->spdy_session_pool()->Get(endpoint_host_port_proxy_pair_, | 179 session_->spdy_session_pool()->Get(endpoint_host_port_proxy_pair_, |
180 BoundNetLog()); | 180 BoundNetLog()); |
181 | 181 |
182 // Perform the TCP connect | 182 // Perform the TCP connect |
183 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); | 183 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); |
184 EXPECT_EQ(OK, | 184 EXPECT_EQ(OK, |
185 connection->Init(endpoint_host_port_pair_.ToString(), | 185 connection->Init(endpoint_host_port_pair_.ToString(), |
186 transport_params_, | 186 transport_params_, LOWEST, CompletionCallback(), |
187 LOWEST, NULL, session_->GetTransportSocketPool(), | 187 session_->GetTransportSocketPool(), |
188 BoundNetLog())); | 188 BoundNetLog())); |
189 spdy_session_->InitializeWithSocket(connection.release(), false, OK); | 189 spdy_session_->InitializeWithSocket(connection.release(), false, OK); |
190 | 190 |
191 // Create the SPDY Stream | 191 // Create the SPDY Stream |
192 ASSERT_EQ( | 192 ASSERT_EQ( |
193 OK, | 193 OK, |
194 spdy_session_->CreateStream(url_, LOWEST, &spdy_stream_, BoundNetLog(), | 194 spdy_session_->CreateStream(url_, LOWEST, &spdy_stream_, BoundNetLog(), |
195 NULL)); | 195 NULL)); |
196 | 196 |
197 // Create the SpdyProxyClientSocket | 197 // Create the SpdyProxyClientSocket |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 write_callback_.callback())); | 1284 write_callback_.callback())); |
1285 | 1285 |
1286 Run(2); | 1286 Run(2); |
1287 | 1287 |
1288 EXPECT_FALSE(sock_.get()); | 1288 EXPECT_FALSE(sock_.get()); |
1289 EXPECT_TRUE(read_callback.have_result()); | 1289 EXPECT_TRUE(read_callback.have_result()); |
1290 EXPECT_FALSE(write_callback_.have_result()); | 1290 EXPECT_FALSE(write_callback_.have_result()); |
1291 } | 1291 } |
1292 | 1292 |
1293 } // namespace net | 1293 } // namespace net |
OLD | NEW |