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 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 238 } |
239 | 239 |
240 void CloseStream(QuicStreamId id) { | 240 void CloseStream(QuicStreamId id) { |
241 EXPECT_CALL(*connection_, SendRstStream(id, _, _)); | 241 EXPECT_CALL(*connection_, SendRstStream(id, _, _)); |
242 session_.CloseStream(id); | 242 session_.CloseStream(id); |
243 closed_streams_.insert(id); | 243 closed_streams_.insert(id); |
244 } | 244 } |
245 | 245 |
246 QuicVersion version() const { return connection_->version(); } | 246 QuicVersion version() const { return connection_->version(); } |
247 | 247 |
248 MockHelper helper_; | 248 MockConnectionHelper helper_; |
249 StrictMock<MockConnection>* connection_; | 249 StrictMock<MockConnection>* connection_; |
250 TestSession session_; | 250 TestSession session_; |
251 set<QuicStreamId> closed_streams_; | 251 set<QuicStreamId> closed_streams_; |
252 SpdyHeaderBlock headers_; | 252 SpdyHeaderBlock headers_; |
253 }; | 253 }; |
254 | 254 |
255 class QuicSessionTestServer : public QuicSessionTestBase { | 255 class QuicSessionTestServer : public QuicSessionTestBase { |
256 protected: | 256 protected: |
257 QuicSessionTestServer() : QuicSessionTestBase(Perspective::IS_SERVER) {} | 257 QuicSessionTestServer() : QuicSessionTestBase(Perspective::IS_SERVER) {} |
258 }; | 258 }; |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 // Verify that there is no entry for the stream in | 1123 // Verify that there is no entry for the stream in |
1124 // locally_closed_streams_highest_offset_. | 1124 // locally_closed_streams_highest_offset_. |
1125 EXPECT_EQ( | 1125 EXPECT_EQ( |
1126 FLAGS_quic_fix_fin_accounting ? 0u : 1u, | 1126 FLAGS_quic_fix_fin_accounting ? 0u : 1u, |
1127 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(&session_).size()); | 1127 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(&session_).size()); |
1128 } | 1128 } |
1129 | 1129 |
1130 } // namespace | 1130 } // namespace |
1131 } // namespace test | 1131 } // namespace test |
1132 } // namespace net | 1132 } // namespace net |
OLD | NEW |