| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 config_, connection_, &owner_, &session_helper_, &crypto_config_, | 198 config_, connection_, &owner_, &session_helper_, &crypto_config_, |
| 199 &compressed_certs_cache_)); | 199 &compressed_certs_cache_)); |
| 200 MockClock clock; | 200 MockClock clock; |
| 201 handshake_message_.reset(crypto_config_.AddDefaultConfig( | 201 handshake_message_.reset(crypto_config_.AddDefaultConfig( |
| 202 QuicRandom::GetInstance(), &clock, | 202 QuicRandom::GetInstance(), &clock, |
| 203 QuicCryptoServerConfig::ConfigOptions())); | 203 QuicCryptoServerConfig::ConfigOptions())); |
| 204 session_->Initialize(); | 204 session_->Initialize(); |
| 205 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 205 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
| 206 headers_stream_ = new MockQuicHeadersStream(session_.get()); | 206 headers_stream_ = new MockQuicHeadersStream(session_.get()); |
| 207 QuicSpdySessionPeer::SetHeadersStream(session_.get(), headers_stream_); | 207 QuicSpdySessionPeer::SetHeadersStream(session_.get(), headers_stream_); |
| 208 // TODO(jri): Remove this line once tests pass. | |
| 209 FLAGS_quic_cede_correctly = false; | |
| 210 | 208 |
| 211 session_->OnConfigNegotiated(); | 209 session_->OnConfigNegotiated(); |
| 212 } | 210 } |
| 213 | 211 |
| 214 StrictMock<MockQuicServerSessionVisitor> owner_; | 212 StrictMock<MockQuicServerSessionVisitor> owner_; |
| 215 StrictMock<MockQuicServerSessionHelper> session_helper_; | 213 StrictMock<MockQuicServerSessionHelper> session_helper_; |
| 216 MockQuicConnectionHelper helper_; | 214 MockQuicConnectionHelper helper_; |
| 217 MockAlarmFactory alarm_factory_; | 215 MockAlarmFactory alarm_factory_; |
| 218 StrictMock<MockQuicConnectionWithSendStreamData>* connection_; | 216 StrictMock<MockQuicConnectionWithSendStreamData>* connection_; |
| 219 QuicConfig config_; | 217 QuicConfig config_; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); | 595 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); |
| 598 | 596 |
| 599 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); | 597 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); |
| 600 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); | 598 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); |
| 601 visitor_->OnRstStream(rst); | 599 visitor_->OnRstStream(rst); |
| 602 } | 600 } |
| 603 | 601 |
| 604 } // namespace | 602 } // namespace |
| 605 } // namespace test | 603 } // namespace test |
| 606 } // namespace net | 604 } // namespace net |
| OLD | NEW |