| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 259 } |
| 260 | 260 |
| 261 void CloseStream(QuicStreamId id) { | 261 void CloseStream(QuicStreamId id) { |
| 262 EXPECT_CALL(*connection_, SendRstStream(id, _, _)); | 262 EXPECT_CALL(*connection_, SendRstStream(id, _, _)); |
| 263 session_.CloseStream(id); | 263 session_.CloseStream(id); |
| 264 closed_streams_.insert(id); | 264 closed_streams_.insert(id); |
| 265 } | 265 } |
| 266 | 266 |
| 267 QuicVersion version() const { return connection_->version(); } | 267 QuicVersion version() const { return connection_->version(); } |
| 268 | 268 |
| 269 QuicFlagSaver flags_; // Save/restore all QUIC flag values. |
| 269 MockQuicConnectionHelper helper_; | 270 MockQuicConnectionHelper helper_; |
| 270 MockAlarmFactory alarm_factory_; | 271 MockAlarmFactory alarm_factory_; |
| 271 StrictMock<MockQuicConnection>* connection_; | 272 StrictMock<MockQuicConnection>* connection_; |
| 272 TestSession session_; | 273 TestSession session_; |
| 273 set<QuicStreamId> closed_streams_; | 274 set<QuicStreamId> closed_streams_; |
| 274 SpdyHeaderBlock headers_; | 275 SpdyHeaderBlock headers_; |
| 275 }; | 276 }; |
| 276 | 277 |
| 277 class QuicSessionTestServer : public QuicSessionTestBase { | 278 class QuicSessionTestServer : public QuicSessionTestBase { |
| 278 protected: | 279 protected: |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 if (version() <= QUIC_VERSION_35) { | 1253 if (version() <= QUIC_VERSION_35) { |
| 1253 EXPECT_FALSE(session_.force_hol_blocking()); | 1254 EXPECT_FALSE(session_.force_hol_blocking()); |
| 1254 } else { | 1255 } else { |
| 1255 EXPECT_TRUE(session_.force_hol_blocking()); | 1256 EXPECT_TRUE(session_.force_hol_blocking()); |
| 1256 } | 1257 } |
| 1257 } | 1258 } |
| 1258 | 1259 |
| 1259 } // namespace | 1260 } // namespace |
| 1260 } // namespace test | 1261 } // namespace test |
| 1261 } // namespace net | 1262 } // namespace net |
| OLD | NEW |