OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_session_pool.h" | 5 #include "net/spdy/spdy_session_pool.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void RunIPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type); | 43 void RunIPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type); |
44 | 44 |
45 SpdySessionDependencies session_deps_; | 45 SpdySessionDependencies session_deps_; |
46 scoped_refptr<HttpNetworkSession> http_session_; | 46 scoped_refptr<HttpNetworkSession> http_session_; |
47 SpdySessionPool* spdy_session_pool_; | 47 SpdySessionPool* spdy_session_pool_; |
48 }; | 48 }; |
49 | 49 |
50 INSTANTIATE_TEST_CASE_P( | 50 INSTANTIATE_TEST_CASE_P( |
51 NextProto, | 51 NextProto, |
52 SpdySessionPoolTest, | 52 SpdySessionPoolTest, |
53 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, | 53 testing::Values(kProtoDeprecatedSPDY2, |
| 54 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, |
54 kProtoHTTP2Draft04)); | 55 kProtoHTTP2Draft04)); |
55 | 56 |
56 // A delegate that opens a new session when it is closed. | 57 // A delegate that opens a new session when it is closed. |
57 class SessionOpeningDelegate : public SpdyStream::Delegate { | 58 class SessionOpeningDelegate : public SpdyStream::Delegate { |
58 public: | 59 public: |
59 SessionOpeningDelegate(SpdySessionPool* spdy_session_pool, | 60 SessionOpeningDelegate(SpdySessionPool* spdy_session_pool, |
60 const SpdySessionKey& key) | 61 const SpdySessionKey& key) |
61 : spdy_session_pool_(spdy_session_pool), | 62 : spdy_session_pool_(spdy_session_pool), |
62 key_(key) {} | 63 key_(key) {} |
63 | 64 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 RunIPPoolingTest(SPDY_POOL_CLOSE_CURRENT_SESSIONS); | 489 RunIPPoolingTest(SPDY_POOL_CLOSE_CURRENT_SESSIONS); |
489 } | 490 } |
490 | 491 |
491 TEST_P(SpdySessionPoolTest, IPPoolingCloseIdleSessions) { | 492 TEST_P(SpdySessionPoolTest, IPPoolingCloseIdleSessions) { |
492 RunIPPoolingTest(SPDY_POOL_CLOSE_IDLE_SESSIONS); | 493 RunIPPoolingTest(SPDY_POOL_CLOSE_IDLE_SESSIONS); |
493 } | 494 } |
494 | 495 |
495 } // namespace | 496 } // namespace |
496 | 497 |
497 } // namespace net | 498 } // namespace net |
OLD | NEW |