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

Unified Diff: net/quic/quic_flow_controller_test.cc

Issue 605163004: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0925
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_flow_controller_test.cc
diff --git a/net/quic/quic_flow_controller_test.cc b/net/quic/quic_flow_controller_test.cc
index ca612754c449a54e12fb4e074457028682fdba94..f96016953b2fa093a4388be42914eb479d7ebc0f 100644
--- a/net/quic/quic_flow_controller_test.cc
+++ b/net/quic/quic_flow_controller_test.cc
@@ -114,69 +114,6 @@ TEST_F(QuicFlowControllerTest, ReceivingBytes) {
QuicFlowControllerPeer::ReceiveWindowSize(flow_controller_.get()));
}
-TEST_F(QuicFlowControllerTest,
- DisabledWhenQuicVersionDoesNotSupportFlowControl) {
- // Only support version 16: no flow control.
- QuicConnectionPeer::SetSupportedVersions(&connection_,
- SupportedVersions(QUIC_VERSION_16));
-
- Initialize();
-
- MockConnection connection(false);
-
- // Should not be enabled, and should not report as blocked.
- EXPECT_FALSE(flow_controller_->IsEnabled());
- EXPECT_FALSE(flow_controller_->IsBlocked());
- EXPECT_FALSE(flow_controller_->FlowControlViolation());
-
- // Any attempts to add/remove bytes should have no effect.
- EXPECT_EQ(send_window_, flow_controller_->SendWindowSize());
- EXPECT_EQ(send_window_,
- QuicFlowControllerPeer::SendWindowOffset(flow_controller_.get()));
- EXPECT_EQ(receive_window_, QuicFlowControllerPeer::ReceiveWindowOffset(
- flow_controller_.get()));
- flow_controller_->AddBytesSent(123);
- flow_controller_->AddBytesConsumed(456);
- flow_controller_->UpdateHighestReceivedOffset(789);
- EXPECT_EQ(send_window_, flow_controller_->SendWindowSize());
- EXPECT_EQ(send_window_,
- QuicFlowControllerPeer::SendWindowOffset(flow_controller_.get()));
- EXPECT_EQ(receive_window_, QuicFlowControllerPeer::ReceiveWindowOffset(
- flow_controller_.get()));
-
- // Any attempt to change offset should have no effect.
- EXPECT_EQ(send_window_, flow_controller_->SendWindowSize());
- EXPECT_EQ(send_window_,
- QuicFlowControllerPeer::SendWindowOffset(flow_controller_.get()));
- flow_controller_->UpdateSendWindowOffset(send_window_ + 12345);
- EXPECT_EQ(send_window_, flow_controller_->SendWindowSize());
- EXPECT_EQ(send_window_,
- QuicFlowControllerPeer::SendWindowOffset(flow_controller_.get()));
-
- // The connection should never send WINDOW_UPDATE or BLOCKED frames, even if
- // the internal state implies that it should.
-
- // If the flow controller was enabled, then a send window size of 0 would
- // trigger a BLOCKED frame to be sent.
- EXPECT_EQ(send_window_, flow_controller_->SendWindowSize());
- EXPECT_CALL(connection_, SendBlocked(_)).Times(0);
- flow_controller_->MaybeSendBlocked();
-
- // If the flow controller was enabled, then a WINDOW_UPDATE would be sent if
- // (receive window) < (max receive window / 2)
- QuicFlowControllerPeer::SetReceiveWindowOffset(flow_controller_.get(),
- max_receive_window_ / 10);
- EXPECT_TRUE(QuicFlowControllerPeer::ReceiveWindowSize(
- flow_controller_.get()) < (max_receive_window_ / 2));
- EXPECT_CALL(connection_, SendWindowUpdate(_, _)).Times(0);
- flow_controller_->AddBytesConsumed(0);
-
- // Should not be enabled, and should not report as blocked.
- EXPECT_FALSE(flow_controller_->IsEnabled());
- EXPECT_FALSE(flow_controller_->IsBlocked());
- EXPECT_FALSE(flow_controller_->FlowControlViolation());
-}
-
TEST_F(QuicFlowControllerTest, OnlySendBlockedFrameOncePerOffset) {
Initialize();
« no previous file with comments | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698