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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 // Creates a new spdy session | 178 // Creates a new spdy session |
179 spdy_session_ = | 179 spdy_session_ = |
180 session_->spdy_session_pool()->Get(endpoint_host_port_proxy_pair_, | 180 session_->spdy_session_pool()->Get(endpoint_host_port_proxy_pair_, |
181 BoundNetLog()); | 181 BoundNetLog()); |
182 | 182 |
183 // Perform the TCP connect | 183 // Perform the TCP connect |
184 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); | 184 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); |
185 EXPECT_EQ(OK, | 185 EXPECT_EQ(OK, |
186 connection->Init(endpoint_host_port_pair_.ToString(), | 186 connection->Init(endpoint_host_port_pair_.ToString(), |
187 transport_params_, | 187 transport_params_, LOWEST, CompletionCallback(), |
188 LOWEST, NULL, session_->GetTransportSocketPool(), | 188 session_->GetTransportSocketPool(), |
189 BoundNetLog())); | 189 BoundNetLog())); |
190 spdy_session_->InitializeWithSocket(connection.release(), false, OK); | 190 spdy_session_->InitializeWithSocket(connection.release(), false, OK); |
191 | 191 |
192 // Create the SPDY Stream | 192 // Create the SPDY Stream |
193 ASSERT_EQ( | 193 ASSERT_EQ( |
194 OK, | 194 OK, |
195 spdy_session_->CreateStream(url_, LOWEST, &spdy_stream_, BoundNetLog(), | 195 spdy_session_->CreateStream(url_, LOWEST, &spdy_stream_, BoundNetLog(), |
196 NULL)); | 196 NULL)); |
197 | 197 |
198 // Create the SpdyProxyClientSocket | 198 // Create the SpdyProxyClientSocket |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 write_callback_.callback())); | 1354 write_callback_.callback())); |
1355 | 1355 |
1356 Run(2); | 1356 Run(2); |
1357 | 1357 |
1358 EXPECT_FALSE(sock_.get()); | 1358 EXPECT_FALSE(sock_.get()); |
1359 EXPECT_TRUE(read_callback.have_result()); | 1359 EXPECT_TRUE(read_callback.have_result()); |
1360 EXPECT_FALSE(write_callback_.have_result()); | 1360 EXPECT_FALSE(write_callback_.have_result()); |
1361 } | 1361 } |
1362 | 1362 |
1363 } // namespace net | 1363 } // namespace net |
OLD | NEW |