| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 MOCK_METHOD3(WritePushPromiseMock, | 77 MOCK_METHOD3(WritePushPromiseMock, |
| 78 size_t(QuicStreamId original_stream_id, | 78 size_t(QuicStreamId original_stream_id, |
| 79 QuicStreamId promised_stream_id, | 79 QuicStreamId promised_stream_id, |
| 80 const SpdyHeaderBlock& headers)); | 80 const SpdyHeaderBlock& headers)); |
| 81 | 81 |
| 82 size_t WriteHeaders( | 82 size_t WriteHeaders( |
| 83 QuicStreamId stream_id, | 83 QuicStreamId stream_id, |
| 84 SpdyHeaderBlock headers, | 84 SpdyHeaderBlock headers, |
| 85 bool fin, | 85 bool fin, |
| 86 SpdyPriority priority, | 86 SpdyPriority priority, |
| 87 const scoped_refptr<QuicAckListenerInterface>& ack_listener) override { | 87 scoped_refptr<QuicAckListenerInterface> ack_listener) override { |
| 88 return WriteHeadersMock(stream_id, headers, fin, priority, ack_listener); | 88 return WriteHeadersMock(stream_id, headers, fin, priority, ack_listener); |
| 89 } | 89 } |
| 90 MOCK_METHOD5( | 90 MOCK_METHOD5( |
| 91 WriteHeadersMock, | 91 WriteHeadersMock, |
| 92 size_t(QuicStreamId stream_id, | 92 size_t(QuicStreamId stream_id, |
| 93 const SpdyHeaderBlock& headers, | 93 const SpdyHeaderBlock& headers, |
| 94 bool fin, | 94 bool fin, |
| 95 SpdyPriority priority, | 95 SpdyPriority priority, |
| 96 const scoped_refptr<QuicAckListenerInterface>& ack_listener)); | 96 const scoped_refptr<QuicAckListenerInterface>& ack_listener)); |
| 97 }; | 97 }; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 alarm_factory, | 132 alarm_factory, |
| 133 perspective, | 133 perspective, |
| 134 supported_versions) {} | 134 supported_versions) {} |
| 135 | 135 |
| 136 MOCK_METHOD5( | 136 MOCK_METHOD5( |
| 137 SendStreamData, | 137 SendStreamData, |
| 138 QuicConsumedData(QuicStreamId id, | 138 QuicConsumedData(QuicStreamId id, |
| 139 QuicIOVector iov, | 139 QuicIOVector iov, |
| 140 QuicStreamOffset offset, | 140 QuicStreamOffset offset, |
| 141 bool fin, | 141 bool fin, |
| 142 const scoped_refptr<QuicAckListenerInterface>& listern)); | 142 scoped_refptr<QuicAckListenerInterface> listern)); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 class QuicSimpleServerSessionPeer { | 145 class QuicSimpleServerSessionPeer { |
| 146 public: | 146 public: |
| 147 static void SetCryptoStream(QuicSimpleServerSession* s, | 147 static void SetCryptoStream(QuicSimpleServerSession* s, |
| 148 QuicCryptoServerStream* crypto_stream) { | 148 QuicCryptoServerStream* crypto_stream) { |
| 149 s->crypto_stream_.reset(crypto_stream); | 149 s->crypto_stream_.reset(crypto_stream); |
| 150 s->static_streams()[kCryptoStreamId] = crypto_stream; | 150 s->static_streams()[kCryptoStreamId] = crypto_stream; |
| 151 } | 151 } |
| 152 | 152 |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); | 619 .WillOnce(Return(QuicConsumedData(kStreamFlowControlWindowSize, false))); |
| 620 | 620 |
| 621 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); | 621 EXPECT_CALL(*connection_, SendBlocked(stream_to_open)); |
| 622 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); | 622 QuicRstStreamFrame rst(stream_got_reset, QUIC_STREAM_CANCELLED, 0); |
| 623 visitor_->OnRstStream(rst); | 623 visitor_->OnRstStream(rst); |
| 624 } | 624 } |
| 625 | 625 |
| 626 } // namespace | 626 } // namespace |
| 627 } // namespace test | 627 } // namespace test |
| 628 } // namespace net | 628 } // namespace net |
| OLD | NEW |