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/quic_session.h" | 5 #include "net/quic/quic_session.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 QuicSession* const session_; | 118 QuicSession* const session_; |
119 const QuicStreamId stream_id_; | 119 const QuicStreamId stream_id_; |
120 }; | 120 }; |
121 | 121 |
122 class TestSession : public QuicSession { | 122 class TestSession : public QuicSession { |
123 public: | 123 public: |
124 explicit TestSession(QuicConnection* connection) | 124 explicit TestSession(QuicConnection* connection) |
125 : QuicSession(connection, | 125 : QuicSession(connection, |
126 DefaultQuicConfig()), | 126 DefaultQuicConfig()), |
127 crypto_stream_(this), | 127 crypto_stream_(this), |
128 writev_consumes_all_data_(false) {} | 128 writev_consumes_all_data_(false) { |
| 129 InitializeSession(); |
| 130 } |
129 | 131 |
130 virtual TestCryptoStream* GetCryptoStream() OVERRIDE { | 132 virtual TestCryptoStream* GetCryptoStream() OVERRIDE { |
131 return &crypto_stream_; | 133 return &crypto_stream_; |
132 } | 134 } |
133 | 135 |
134 virtual TestStream* CreateOutgoingDataStream() OVERRIDE { | 136 virtual TestStream* CreateOutgoingDataStream() OVERRIDE { |
135 TestStream* stream = new TestStream(GetNextStreamId(), this); | 137 TestStream* stream = new TestStream(GetNextStreamId(), this); |
136 ActivateStream(stream); | 138 ActivateStream(stream); |
137 return stream; | 139 return stream; |
138 } | 140 } |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 | 914 |
913 // Version 16 means all flow control is disabled. | 915 // Version 16 means all flow control is disabled. |
914 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16); | 916 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16); |
915 EXPECT_FALSE(session_.flow_controller()->IsEnabled()); | 917 EXPECT_FALSE(session_.flow_controller()->IsEnabled()); |
916 EXPECT_FALSE(stream->flow_controller()->IsEnabled()); | 918 EXPECT_FALSE(stream->flow_controller()->IsEnabled()); |
917 } | 919 } |
918 | 920 |
919 } // namespace | 921 } // namespace |
920 } // namespace test | 922 } // namespace test |
921 } // namespace net | 923 } // namespace net |
OLD | NEW |