| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/tools/quic/quic_simple_server_session.h" | 5 #include "net/tools/quic/quic_simple_server_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // TODO(jri): Remove this line once tests pass. | 182 // TODO(jri): Remove this line once tests pass. |
| 183 FLAGS_quic_cede_correctly = false; | 183 FLAGS_quic_cede_correctly = false; |
| 184 } | 184 } |
| 185 | 185 |
| 186 StrictMock<MockQuicServerSessionVisitor> owner_; | 186 StrictMock<MockQuicServerSessionVisitor> owner_; |
| 187 MockConnectionHelper helper_; | 187 MockConnectionHelper helper_; |
| 188 StrictMock<MockConnectionWithSendStreamData>* connection_; | 188 StrictMock<MockConnectionWithSendStreamData>* connection_; |
| 189 QuicConfig config_; | 189 QuicConfig config_; |
| 190 QuicCryptoServerConfig crypto_config_; | 190 QuicCryptoServerConfig crypto_config_; |
| 191 QuicCompressedCertsCache compressed_certs_cache_; | 191 QuicCompressedCertsCache compressed_certs_cache_; |
| 192 scoped_ptr<QuicSimpleServerSession> session_; | 192 std::unique_ptr<QuicSimpleServerSession> session_; |
| 193 scoped_ptr<CryptoHandshakeMessage> handshake_message_; | 193 std::unique_ptr<CryptoHandshakeMessage> handshake_message_; |
| 194 QuicConnectionVisitorInterface* visitor_; | 194 QuicConnectionVisitorInterface* visitor_; |
| 195 MockQuicHeadersStream* headers_stream_; | 195 MockQuicHeadersStream* headers_stream_; |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 INSTANTIATE_TEST_CASE_P(Tests, | 198 INSTANTIATE_TEST_CASE_P(Tests, |
| 199 QuicSimpleServerSessionTest, | 199 QuicSimpleServerSessionTest, |
| 200 ::testing::ValuesIn(QuicSupportedVersions())); | 200 ::testing::ValuesIn(QuicSupportedVersions())); |
| 201 | 201 |
| 202 TEST_P(QuicSimpleServerSessionTest, CloseStreamDueToReset) { | 202 TEST_P(QuicSimpleServerSessionTest, CloseStreamDueToReset) { |
| 203 // Open a stream, then reset it. | 203 // Open a stream, then reset it. |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); | 564 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); |
| 565 | 565 |
| 566 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); | 566 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); |
| 567 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); | 567 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); |
| 568 visitor_->OnRstStream(rst); | 568 visitor_->OnRstStream(rst); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace | 571 } // namespace |
| 572 } // namespace test | 572 } // namespace test |
| 573 } // namespace net | 573 } // namespace net |
| OLD | NEW |