Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / net / quic / reliable_quic_stream_test.cc
index b673a4e..f188783 100644 (file)
@@ -6,7 +6,6 @@
 
 #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"
@@ -154,7 +153,7 @@ TEST_F(ReliableQuicStreamTest, WriteAllData) {
   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);
@@ -214,7 +213,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferData) {
 
   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);
@@ -249,7 +248,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithFecProtectAlways) {
 
   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);
@@ -285,7 +284,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithFecProtectOptional) {
 
   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);
@@ -395,7 +394,6 @@ TEST_F(ReliableQuicStreamTest, OnlySendOneRst) {
 }
 
 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);
@@ -431,7 +429,6 @@ TEST_F(ReliableQuicStreamTest, StreamFlowControlMultipleWindowUpdates) {
 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};
@@ -473,9 +470,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithQuicAckNotifier) {
 
   // 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;
 
@@ -528,9 +523,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataAckNotificationBeforeFlush) {
 
   // 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;
 
@@ -636,11 +629,6 @@ TEST_F(ReliableQuicStreamTest, WriteAndBufferDataWithAckNotiferOnlyFinRemains) {
 // 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
@@ -654,7 +642,7 @@ TEST_F(ReliableQuicStreamTest,
   // 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) {