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/quic/core/quic_session.h" | 5 #include "net/quic/core/quic_session.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 class TestSession : public QuicSpdySession { | 113 class TestSession : public QuicSpdySession { |
114 public: | 114 public: |
115 explicit TestSession(QuicConnection* connection) | 115 explicit TestSession(QuicConnection* connection) |
116 : QuicSpdySession(connection, DefaultQuicConfig()), | 116 : QuicSpdySession(connection, DefaultQuicConfig()), |
117 crypto_stream_(this), | 117 crypto_stream_(this), |
118 writev_consumes_all_data_(false) { | 118 writev_consumes_all_data_(false) { |
119 Initialize(); | 119 Initialize(); |
120 } | 120 } |
121 | 121 |
| 122 ~TestSession() override { delete connection(); } |
| 123 |
122 TestCryptoStream* GetCryptoStream() override { return &crypto_stream_; } | 124 TestCryptoStream* GetCryptoStream() override { return &crypto_stream_; } |
123 | 125 |
124 TestStream* CreateOutgoingDynamicStream(SpdyPriority priority) override { | 126 TestStream* CreateOutgoingDynamicStream(SpdyPriority priority) override { |
125 TestStream* stream = new TestStream(GetNextOutgoingStreamId(), this); | 127 TestStream* stream = new TestStream(GetNextOutgoingStreamId(), this); |
126 stream->SetPriority(priority); | 128 stream->SetPriority(priority); |
127 ActivateStream(stream); | 129 ActivateStream(stream); |
128 return stream; | 130 return stream; |
129 } | 131 } |
130 | 132 |
131 TestStream* CreateIncomingDynamicStream(QuicStreamId id) override { | 133 TestStream* CreateIncomingDynamicStream(QuicStreamId id) override { |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 if (version() <= QUIC_VERSION_35) { | 1203 if (version() <= QUIC_VERSION_35) { |
1202 EXPECT_FALSE(session_.force_hol_blocking()); | 1204 EXPECT_FALSE(session_.force_hol_blocking()); |
1203 } else { | 1205 } else { |
1204 EXPECT_TRUE(session_.force_hol_blocking()); | 1206 EXPECT_TRUE(session_.force_hol_blocking()); |
1205 } | 1207 } |
1206 } | 1208 } |
1207 | 1209 |
1208 } // namespace | 1210 } // namespace |
1209 } // namespace test | 1211 } // namespace test |
1210 } // namespace net | 1212 } // namespace net |
OLD | NEW |