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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // This lengthy block is reaching into the pool to dig out the active | 557 // This lengthy block is reaching into the pool to dig out the active |
558 // session. Once we have the session, we verify that the streams are | 558 // session. Once we have the session, we verify that the streams are |
559 // all closed and not leaked at this point. | 559 // all closed and not leaked at this point. |
560 const GURL& url = helper.request().url; | 560 const GURL& url = helper.request().url; |
561 int port = helper.test_params().ssl_type == SPDYNPN ? 443 : 80; | 561 int port = helper.test_params().ssl_type == SPDYNPN ? 443 : 80; |
562 HostPortPair host_port_pair(url.host(), port); | 562 HostPortPair host_port_pair(url.host(), port); |
563 SpdySessionKey key(host_port_pair, ProxyServer::Direct(), | 563 SpdySessionKey key(host_port_pair, ProxyServer::Direct(), |
564 kPrivacyModeDisabled); | 564 kPrivacyModeDisabled); |
565 BoundNetLog log; | 565 BoundNetLog log; |
566 const scoped_refptr<HttpNetworkSession>& session = helper.session(); | 566 const scoped_refptr<HttpNetworkSession>& session = helper.session(); |
567 scoped_refptr<SpdySession> spdy_session = | 567 base::WeakPtr<SpdySession> spdy_session = |
568 session->spdy_session_pool()->FindAvailableSession(key, log); | 568 session->spdy_session_pool()->FindAvailableSession(key, log); |
569 ASSERT_TRUE(spdy_session != NULL); | 569 ASSERT_TRUE(spdy_session != NULL); |
570 EXPECT_EQ(0u, spdy_session->num_active_streams()); | 570 EXPECT_EQ(0u, spdy_session->num_active_streams()); |
571 EXPECT_EQ(0u, spdy_session->num_unclaimed_pushed_streams()); | 571 EXPECT_EQ(0u, spdy_session->num_unclaimed_pushed_streams()); |
572 } | 572 } |
573 | 573 |
574 void RunServerPushTest(OrderedSocketData* data, | 574 void RunServerPushTest(OrderedSocketData* data, |
575 HttpResponseInfo* response, | 575 HttpResponseInfo* response, |
576 HttpResponseInfo* push_response, | 576 HttpResponseInfo* push_response, |
577 const std::string& expected) { | 577 const std::string& expected) { |
(...skipping 5808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6386 // since we're send-stalled. | 6386 // since we're send-stalled. |
6387 EXPECT_TRUE(stream->stream()->send_stalled_by_flow_control()); | 6387 EXPECT_TRUE(stream->stream()->send_stalled_by_flow_control()); |
6388 | 6388 |
6389 // Read in WINDOW_UPDATE or SETTINGS frame. | 6389 // Read in WINDOW_UPDATE or SETTINGS frame. |
6390 data.RunFor((GetParam().protocol >= kProtoSPDY31) ? 8 : 7); | 6390 data.RunFor((GetParam().protocol >= kProtoSPDY31) ? 8 : 7); |
6391 rv = callback.WaitForResult(); | 6391 rv = callback.WaitForResult(); |
6392 helper.VerifyDataConsumed(); | 6392 helper.VerifyDataConsumed(); |
6393 } | 6393 } |
6394 | 6394 |
6395 } // namespace net | 6395 } // namespace net |
OLD | NEW |