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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 SpdySessionDependencies session_deps_; | 46 SpdySessionDependencies session_deps_; |
47 scoped_refptr<HttpNetworkSession> http_session_; | 47 scoped_refptr<HttpNetworkSession> http_session_; |
48 SpdySessionPool* spdy_session_pool_; | 48 SpdySessionPool* spdy_session_pool_; |
49 }; | 49 }; |
50 | 50 |
51 INSTANTIATE_TEST_CASE_P( | 51 INSTANTIATE_TEST_CASE_P( |
52 NextProto, | 52 NextProto, |
53 SpdySessionPoolTest, | 53 SpdySessionPoolTest, |
54 testing::Values(kProtoDeprecatedSPDY2, | 54 testing::Values(kProtoDeprecatedSPDY2, |
55 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4)); | 55 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); |
56 | 56 |
57 // A delegate that opens a new session when it is closed. | 57 // A delegate that opens a new session when it is closed. |
58 class SessionOpeningDelegate : public SpdyStream::Delegate { | 58 class SessionOpeningDelegate : public SpdyStream::Delegate { |
59 public: | 59 public: |
60 SessionOpeningDelegate(SpdySessionPool* spdy_session_pool, | 60 SessionOpeningDelegate(SpdySessionPool* spdy_session_pool, |
61 const SpdySessionKey& key) | 61 const SpdySessionKey& key) |
62 : spdy_session_pool_(spdy_session_pool), | 62 : spdy_session_pool_(spdy_session_pool), |
63 key_(key) {} | 63 key_(key) {} |
64 | 64 |
65 ~SessionOpeningDelegate() override {} | 65 ~SessionOpeningDelegate() override {} |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 EXPECT_TRUE(delegateA.StreamIsClosed()); | 611 EXPECT_TRUE(delegateA.StreamIsClosed()); |
612 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose()); | 612 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose()); |
613 EXPECT_TRUE(delegateB.StreamIsClosed()); | 613 EXPECT_TRUE(delegateB.StreamIsClosed()); |
614 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose()); | 614 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose()); |
615 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) | 615 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) |
616 } | 616 } |
617 | 617 |
618 } // namespace | 618 } // namespace |
619 | 619 |
620 } // namespace net | 620 } // namespace net |
OLD | NEW |