Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: net/quic/core/quic_stream_test.cc

Issue 2820263005: In QUIC version >= 38, enables random padding of size [1, 256] (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_stream.h" 5 #include "net/quic/core/quic_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "net/quic/core/quic_connection.h" 9 #include "net/quic/core/quic_connection.h"
10 #include "net/quic/core/quic_flags.h" 10 #include "net/quic/core/quic_flags.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool HasWriteBlockedStreams() { 135 bool HasWriteBlockedStreams() {
136 return write_blocked_list_->HasWriteBlockedCryptoOrHeadersStream() || 136 return write_blocked_list_->HasWriteBlockedCryptoOrHeadersStream() ||
137 write_blocked_list_->HasWriteBlockedDataStreams(); 137 write_blocked_list_->HasWriteBlockedDataStreams();
138 } 138 }
139 139
140 QuicConsumedData CloseStreamOnWriteError( 140 QuicConsumedData CloseStreamOnWriteError(
141 QuicStream* /*stream*/, 141 QuicStream* /*stream*/,
142 QuicStreamId id, 142 QuicStreamId id,
143 QuicIOVector /*iov*/, 143 QuicIOVector /*iov*/,
144 QuicStreamOffset /*offset*/, 144 QuicStreamOffset /*offset*/,
145 bool /*fin*/, 145 StreamSendingState /*state*/,
146 const QuicReferenceCountedPointer< 146 const QuicReferenceCountedPointer<
147 QuicAckListenerInterface>& /*ack_listener*/) { 147 QuicAckListenerInterface>& /*ack_listener*/) {
148 session_->CloseStream(id); 148 session_->CloseStream(id);
149 return QuicConsumedData(1, false); 149 return QuicConsumedData(1, false);
150 } 150 }
151 151
152 protected: 152 protected:
153 MockQuicConnectionHelper helper_; 153 MockQuicConnectionHelper helper_;
154 MockAlarmFactory alarm_factory_; 154 MockAlarmFactory alarm_factory_;
155 MockQuicConnection* connection_; 155 MockQuicConnection* connection_;
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 // Receive remaining data and FIN for the request. 710 // Receive remaining data and FIN for the request.
711 QuicStreamFrame frame2(stream_->id(), true, 0, QuicStringPiece("End")); 711 QuicStreamFrame frame2(stream_->id(), true, 0, QuicStringPiece("End"));
712 stream_->OnStreamFrame(frame2); 712 stream_->OnStreamFrame(frame2);
713 EXPECT_TRUE(stream_->fin_received()); 713 EXPECT_TRUE(stream_->fin_received());
714 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); 714 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
715 } 715 }
716 716
717 } // namespace 717 } // namespace
718 } // namespace test 718 } // namespace test
719 } // namespace net 719 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698