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 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 QuicRandom::GetInstance(), &clock, | 201 QuicRandom::GetInstance(), &clock, |
202 QuicCryptoServerConfig::ConfigOptions())); | 202 QuicCryptoServerConfig::ConfigOptions())); |
203 session_->Initialize(); | 203 session_->Initialize(); |
204 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 204 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
205 headers_stream_ = new MockQuicHeadersStream(session_.get()); | 205 headers_stream_ = new MockQuicHeadersStream(session_.get()); |
206 QuicSpdySessionPeer::SetHeadersStream(session_.get(), headers_stream_); | 206 QuicSpdySessionPeer::SetHeadersStream(session_.get(), headers_stream_); |
207 | 207 |
208 session_->OnConfigNegotiated(); | 208 session_->OnConfigNegotiated(); |
209 } | 209 } |
210 | 210 |
211 QuicFlagSaver flags_; // Save/restore all QUIC flag values. | 211 StrictMock<MockQuicSessionVisitor> owner_; |
212 StrictMock<MockQuicServerSessionVisitor> owner_; | |
213 StrictMock<MockQuicCryptoServerStreamHelper> stream_helper_; | 212 StrictMock<MockQuicCryptoServerStreamHelper> stream_helper_; |
214 MockQuicConnectionHelper helper_; | 213 MockQuicConnectionHelper helper_; |
215 MockAlarmFactory alarm_factory_; | 214 MockAlarmFactory alarm_factory_; |
216 StrictMock<MockQuicConnectionWithSendStreamData>* connection_; | 215 StrictMock<MockQuicConnectionWithSendStreamData>* connection_; |
217 QuicConfig config_; | 216 QuicConfig config_; |
218 QuicCryptoServerConfig crypto_config_; | 217 QuicCryptoServerConfig crypto_config_; |
219 QuicCompressedCertsCache compressed_certs_cache_; | 218 QuicCompressedCertsCache compressed_certs_cache_; |
220 std::unique_ptr<QuicSimpleServerSession> session_; | 219 std::unique_ptr<QuicSimpleServerSession> session_; |
221 std::unique_ptr<CryptoHandshakeMessage> handshake_message_; | 220 std::unique_ptr<CryptoHandshakeMessage> handshake_message_; |
222 QuicConnectionVisitorInterface* visitor_; | 221 QuicConnectionVisitorInterface* visitor_; |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); | 624 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); |
626 | 625 |
627 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); | 626 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); |
628 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); | 627 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); |
629 visitor_->OnRstStream(rst); | 628 visitor_->OnRstStream(rst); |
630 } | 629 } |
631 | 630 |
632 } // namespace | 631 } // namespace |
633 } // namespace test | 632 } // namespace test |
634 } // namespace net | 633 } // namespace net |
OLD | NEW |