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

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

Issue 2548613002: deprecate FLAGS_quic_bugfix_fhol_writev_fin_only_v2. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « net/quic/core/quic_headers_stream.cc ('k') | net/quic/core/quic_spdy_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/quic/core/quic_headers_stream.h" 5 #include "net/quic/core/quic_headers_stream.h"
6 6
7 #include <string> 7 #include <string>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 // HTTP/2 DATA frame headers. 988 // HTTP/2 DATA frame headers.
989 EXPECT_EQ(ack_listener->total_acked_bytes(), data_len); 989 EXPECT_EQ(ack_listener->total_acked_bytes(), data_len);
990 } 990 }
991 saved_data_.clear(); 991 saved_data_.clear();
992 saved_payloads_.clear(); 992 saved_payloads_.clear();
993 } 993 }
994 } 994 }
995 } 995 }
996 996
997 TEST_P(QuicHeadersStreamTest, WritevStreamDataFinOnly) { 997 TEST_P(QuicHeadersStreamTest, WritevStreamDataFinOnly) {
998 FLAGS_quic_bugfix_fhol_writev_fin_only_v2 = true;
999 struct iovec iov; 998 struct iovec iov;
1000 string data; 999 string data;
1001 1000
1002 EXPECT_CALL(session_, 1001 EXPECT_CALL(session_,
1003 WritevData(headers_stream_, kHeadersStreamId, _, _, false, _)) 1002 WritevData(headers_stream_, kHeadersStreamId, _, _, false, _))
1004 .WillOnce(WithArgs<2, 5>( 1003 .WillOnce(WithArgs<2, 5>(
1005 Invoke(this, &QuicHeadersStreamTest::SaveIovAndNotifyAckListener))); 1004 Invoke(this, &QuicHeadersStreamTest::SaveIovAndNotifyAckListener)));
1006 1005
1007 QuicConsumedData consumed_data = headers_stream_->WritevStreamData( 1006 QuicConsumedData consumed_data = headers_stream_->WritevStreamData(
1008 kClientDataStreamId1, MakeIOVector(data, &iov), 0, true, nullptr); 1007 kClientDataStreamId1, MakeIOVector(data, &iov), 0, true, nullptr);
1009 1008
1010 EXPECT_EQ(consumed_data.bytes_consumed, 0u); 1009 EXPECT_EQ(consumed_data.bytes_consumed, 0u);
1011 EXPECT_EQ(consumed_data.fin_consumed, true); 1010 EXPECT_EQ(consumed_data.fin_consumed, true);
1012 } 1011 }
1013 1012
1014 TEST_P(QuicHeadersStreamTest, WritevStreamDataSendBlocked) { 1013 TEST_P(QuicHeadersStreamTest, WritevStreamDataSendBlocked) {
1015 FLAGS_quic_bugfix_fhol_writev_fin_only_v2 = true;
1016 QuicStreamId id = kClientDataStreamId1; 1014 QuicStreamId id = kClientDataStreamId1;
1017 QuicStreamOffset offset = 0; 1015 QuicStreamOffset offset = 0;
1018 struct iovec iov; 1016 struct iovec iov;
1019 1017
1020 // This test will issue a write that will require fragmenting into 1018 // This test will issue a write that will require fragmenting into
1021 // multiple HTTP/2 DATA frames. It will ensure that only 1 frame 1019 // multiple HTTP/2 DATA frames. It will ensure that only 1 frame
1022 // will go out in the case that the underlying session becomes write 1020 // will go out in the case that the underlying session becomes write
1023 // blocked. Buffering is required to preserve framing, but the 1021 // blocked. Buffering is required to preserve framing, but the
1024 // amount of buffering is limited to one HTTP/2 data frame. 1022 // amount of buffering is limited to one HTTP/2 data frame.
1025 const int kMinDataFrames = 4; 1023 const int kMinDataFrames = 4;
(...skipping 25 matching lines...) Expand all
1051 consumed_data = headers_stream_->WritevStreamData( 1049 consumed_data = headers_stream_->WritevStreamData(
1052 id, MakeIOVector(data, &iov), offset, fin, nullptr); 1050 id, MakeIOVector(data, &iov), offset, fin, nullptr);
1053 1051
1054 EXPECT_EQ(consumed_data.bytes_consumed, 0u); 1052 EXPECT_EQ(consumed_data.bytes_consumed, 0u);
1055 EXPECT_EQ(consumed_data.fin_consumed, false); 1053 EXPECT_EQ(consumed_data.fin_consumed, false);
1056 } 1054 }
1057 1055
1058 } // namespace 1056 } // namespace
1059 } // namespace test 1057 } // namespace test
1060 } // namespace net 1058 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_headers_stream.cc ('k') | net/quic/core/quic_spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698