OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 session_deps_(GetParam()), | 151 session_deps_(GetParam()), |
152 connect_data_(SYNCHRONOUS, OK), | 152 connect_data_(SYNCHRONOUS, OK), |
153 framer_(spdy_util_.spdy_version(), false), | 153 framer_(spdy_util_.spdy_version(), false), |
154 user_agent_(kUserAgent), | 154 user_agent_(kUserAgent), |
155 url_(kRequestUrl), | 155 url_(kRequestUrl), |
156 proxy_host_port_(kProxyHost, kProxyPort), | 156 proxy_host_port_(kProxyHost, kProxyPort), |
157 endpoint_host_port_pair_(kOriginHost, kOriginPort), | 157 endpoint_host_port_pair_(kOriginHost, kOriginPort), |
158 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_), | 158 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_), |
159 endpoint_spdy_session_key_(endpoint_host_port_pair_, | 159 endpoint_spdy_session_key_(endpoint_host_port_pair_, |
160 proxy_, | 160 proxy_, |
161 PRIVACY_MODE_DISABLED) { | 161 kPrivacyModeDisabled) { |
162 session_deps_.net_log = net_log_.bound().net_log(); | 162 session_deps_.net_log = net_log_.bound().net_log(); |
163 } | 163 } |
164 | 164 |
165 void SpdyProxyClientSocketTest::TearDown() { | 165 void SpdyProxyClientSocketTest::TearDown() { |
166 sock_.reset(NULL); | 166 sock_.reset(NULL); |
167 if (session_.get() != NULL) | 167 if (session_.get() != NULL) |
168 session_->spdy_session_pool()->CloseAllSessions(); | 168 session_->spdy_session_pool()->CloseAllSessions(); |
169 | 169 |
170 // Empty the current queue. | 170 // Empty the current queue. |
171 base::MessageLoop::current()->RunUntilIdle(); | 171 base::MessageLoop::current()->RunUntilIdle(); |
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 write_buf.get(), write_buf->size(), write_callback_.callback())); | 1427 write_buf.get(), write_buf->size(), write_callback_.callback())); |
1428 | 1428 |
1429 Run(1); | 1429 Run(1); |
1430 | 1430 |
1431 EXPECT_FALSE(sock_.get()); | 1431 EXPECT_FALSE(sock_.get()); |
1432 EXPECT_TRUE(read_callback.have_result()); | 1432 EXPECT_TRUE(read_callback.have_result()); |
1433 EXPECT_FALSE(write_callback_.have_result()); | 1433 EXPECT_FALSE(write_callback_.have_result()); |
1434 } | 1434 } |
1435 | 1435 |
1436 } // namespace net | 1436 } // namespace net |
OLD | NEW |