#include "net/quic/quic_ack_notifier.h"
#include "net/quic/quic_connection.h"
-#include "net/quic/quic_flags.h"
#include "net/quic/quic_utils.h"
#include "net/quic/quic_write_blocked_list.h"
#include "net/quic/spdy_utils.h"
Initialize(kShouldProcessData);
size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
- connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
+ PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
PACKET_6BYTE_SEQUENCE_NUMBER, 0u, NOT_IN_FEC_GROUP);
QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
length);
EXPECT_FALSE(HasWriteBlockedStreams());
size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
- connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
+ PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
PACKET_6BYTE_SEQUENCE_NUMBER, 0u, NOT_IN_FEC_GROUP);
QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
length);
EXPECT_FALSE(HasWriteBlockedStreams());
size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
- connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
+ PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
PACKET_6BYTE_SEQUENCE_NUMBER, 0u, IN_FEC_GROUP);
QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
length);
EXPECT_FALSE(HasWriteBlockedStreams());
size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
- connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
+ PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
PACKET_6BYTE_SEQUENCE_NUMBER, 0u, NOT_IN_FEC_GROUP);
QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
length);
}
TEST_F(ReliableQuicStreamTest, StreamFlowControlMultipleWindowUpdates) {
- ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true);
set_initial_flow_control_window_bytes(1000);
Initialize(kShouldProcessData);
TEST_F(ReliableQuicStreamTest, StreamFlowControlShouldNotBlockInLessThanQ017) {
// TODO(rjshade): Remove this test when we no longer have any versions <
// QUIC_VERSION_17.
- ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true);
// Make sure we are using a version which does not support flow control.
QuicVersion kTestQuicVersions[] = {QUIC_VERSION_16};
// Set a large flow control send window so this doesn't interfere with test.
stream_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
- if (FLAGS_enable_quic_connection_flow_control_2) {
- session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
- }
+ session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;
// Set a large flow control send window so this doesn't interfere with test.
stream_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
- if (FLAGS_enable_quic_connection_flow_control_2) {
- session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
- }
+ session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;
// as we check for violation and close the connection early.
TEST_F(ReliableQuicStreamTest,
StreamSequencerNeverSeesPacketsViolatingFlowControl) {
- ValueRestore<bool> old_stream_flag(
- &FLAGS_enable_quic_stream_flow_control_2, true);
- ValueRestore<bool> old_connection_flag(
- &FLAGS_enable_quic_connection_flow_control_2, true);
-
Initialize(kShouldProcessData);
// Receive a stream frame that violates flow control: the byte offset is
// Stream should not accept the frame, and the connection should be closed.
EXPECT_CALL(*connection_,
SendConnectionClose(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA));
- EXPECT_FALSE(stream_->OnStreamFrame(frame));
+ stream_->OnStreamFrame(frame);
}
TEST_F(ReliableQuicStreamTest, FinalByteOffsetFromFin) {