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

Unified Diff: net/quic/quic_flow_controller_test.cc

Issue 312553003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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.h » ('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 f0bf629d0ef1e4d208ba7f863a2b94c8dd8b039a..7ef9bb4c813aeca7dc31ca9d0ee658496ccd75de 100644
--- a/net/quic/quic_flow_controller_test.cc
+++ b/net/quic/quic_flow_controller_test.cc
@@ -97,13 +97,13 @@ TEST_F(QuicFlowControllerTest, ReceivingBytes) {
EXPECT_FALSE(flow_controller_->FlowControlViolation());
// Buffer some bytes, not enough to fill window.
- flow_controller_->AddBytesBuffered(receive_window_ / 2);
+ EXPECT_TRUE(
+ flow_controller_->UpdateHighestReceivedOffset(1 + receive_window_ / 2));
EXPECT_FALSE(flow_controller_->FlowControlViolation());
- EXPECT_EQ(receive_window_ / 2,
+ EXPECT_EQ((receive_window_ / 2) - 1,
QuicFlowControllerPeer::ReceiveWindowSize(flow_controller_.get()));
// Consume enough bytes to send a WINDOW_UPDATE frame.
- flow_controller_->RemoveBytesBuffered(receive_window_ / 2);
flow_controller_->AddBytesConsumed(1 + receive_window_ / 2);
EXPECT_FALSE(flow_controller_->FlowControlViolation());
EXPECT_EQ((receive_window_ / 2) - 1,
@@ -132,8 +132,7 @@ TEST_F(QuicFlowControllerTest,
flow_controller_.get()));
flow_controller_->AddBytesSent(123);
flow_controller_->AddBytesConsumed(456);
- flow_controller_->AddBytesBuffered(789);
- flow_controller_->RemoveBytesBuffered(321);
+ flow_controller_->UpdateHighestReceivedOffset(789);
EXPECT_EQ(send_window_, flow_controller_->SendWindowSize());
EXPECT_EQ(send_window_,
QuicFlowControllerPeer::SendWindowOffset(flow_controller_.get()));
« no previous file with comments | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698