| 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/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 framer_(spdy_util_.spdy_version()), | 172 framer_(spdy_util_.spdy_version()), |
| 173 user_agent_(kUserAgent), | 173 user_agent_(kUserAgent), |
| 174 url_(kRequestUrl), | 174 url_(kRequestUrl), |
| 175 proxy_host_port_(kProxyHost, kProxyPort), | 175 proxy_host_port_(kProxyHost, kProxyPort), |
| 176 endpoint_host_port_pair_(kOriginHost, kOriginPort), | 176 endpoint_host_port_pair_(kOriginHost, kOriginPort), |
| 177 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_), | 177 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_), |
| 178 endpoint_spdy_session_key_(endpoint_host_port_pair_, | 178 endpoint_spdy_session_key_(endpoint_host_port_pair_, |
| 179 proxy_, | 179 proxy_, |
| 180 PRIVACY_MODE_DISABLED) { | 180 PRIVACY_MODE_DISABLED) { |
| 181 session_deps_.net_log = net_log_.bound().net_log(); | 181 session_deps_.net_log = net_log_.bound().net_log(); |
| 182 SpdySession::SetPriorityDependencyDefaultForTesting( | 182 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority(); |
| 183 GetDependenciesFromPriority()); | |
| 184 } | 183 } |
| 185 | 184 |
| 186 SpdyProxyClientSocketTest::~SpdyProxyClientSocketTest() { | 185 SpdyProxyClientSocketTest::~SpdyProxyClientSocketTest() { |
| 187 EXPECT_TRUE(data_->AllWriteDataConsumed()); | 186 EXPECT_TRUE(data_->AllWriteDataConsumed()); |
| 188 EXPECT_TRUE(data_->AllReadDataConsumed()); | 187 EXPECT_TRUE(data_->AllReadDataConsumed()); |
| 189 SpdySession::SetPriorityDependencyDefaultForTesting(false); | |
| 190 } | 188 } |
| 191 | 189 |
| 192 void SpdyProxyClientSocketTest::TearDown() { | 190 void SpdyProxyClientSocketTest::TearDown() { |
| 193 if (session_.get() != NULL) | 191 if (session_.get() != NULL) |
| 194 session_->spdy_session_pool()->CloseAllSessions(); | 192 session_->spdy_session_pool()->CloseAllSessions(); |
| 195 | 193 |
| 196 // Empty the current queue. | 194 // Empty the current queue. |
| 197 base::MessageLoop::current()->RunUntilIdle(); | 195 base::MessageLoop::current()->RunUntilIdle(); |
| 198 PlatformTest::TearDown(); | 196 PlatformTest::TearDown(); |
| 199 } | 197 } |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 | 1379 |
| 1382 EXPECT_FALSE(sock_.get()); | 1380 EXPECT_FALSE(sock_.get()); |
| 1383 EXPECT_TRUE(read_callback.have_result()); | 1381 EXPECT_TRUE(read_callback.have_result()); |
| 1384 EXPECT_FALSE(write_callback_.have_result()); | 1382 EXPECT_FALSE(write_callback_.have_result()); |
| 1385 | 1383 |
| 1386 // Let the RST_STREAM write while |rst| is in-scope. | 1384 // Let the RST_STREAM write while |rst| is in-scope. |
| 1387 base::MessageLoop::current()->RunUntilIdle(); | 1385 base::MessageLoop::current()->RunUntilIdle(); |
| 1388 } | 1386 } |
| 1389 | 1387 |
| 1390 } // namespace net | 1388 } // namespace net |
| OLD | NEW |