| Index: net/quic/reliable_quic_stream_test.cc
|
| diff --git a/net/quic/reliable_quic_stream_test.cc b/net/quic/reliable_quic_stream_test.cc
|
| index 23602a349a3f73f00e1e298c9e4155ce0c586e55..801800b821b4c4075e4fb9251d7b1fd4e576945a 100644
|
| --- a/net/quic/reliable_quic_stream_test.cc
|
| +++ b/net/quic/reliable_quic_stream_test.cc
|
| @@ -75,7 +75,8 @@ class TestStream : public ReliableQuicStream {
|
| class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> {
|
| public:
|
| ReliableQuicStreamTest()
|
| - : initial_flow_control_window_bytes_(kMaxPacketSize) {
|
| + : initial_flow_control_window_bytes_(kMaxPacketSize),
|
| + zero_(QuicTime::Delta::Zero()) {
|
| headers_[":host"] = "www.google.com";
|
| headers_[":path"] = "/index.hml";
|
| headers_[":scheme"] = "https";
|
| @@ -137,6 +138,7 @@ class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> {
|
| SpdyHeaderBlock headers_;
|
| QuicWriteBlockedList* write_blocked_list_;
|
| uint32 initial_flow_control_window_bytes_;
|
| + QuicTime::Delta zero_;
|
| };
|
|
|
| TEST_F(ReliableQuicStreamTest, WriteAllData) {
|
| @@ -384,13 +386,13 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithQuicAckNotifier) {
|
|
|
| // There were two writes, so OnAckNotification is not propagated
|
| // until the third Ack arrives.
|
| - proxy_delegate->OnAckNotification(1, 2, 3, 4);
|
| - proxy_delegate->OnAckNotification(10, 20, 30, 40);
|
| + proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
|
| + proxy_delegate->OnAckNotification(10, 20, 30, 40, zero_);
|
|
|
| // The arguments to delegate->OnAckNotification are the sum of the
|
| // arguments to proxy_delegate OnAckNotification calls.
|
| - EXPECT_CALL(*delegate, OnAckNotification(111, 222, 333, 444));
|
| - proxy_delegate->OnAckNotification(100, 200, 300, 400);
|
| + EXPECT_CALL(*delegate, OnAckNotification(111, 222, 333, 444, zero_));
|
| + proxy_delegate->OnAckNotification(100, 200, 300, 400, zero_);
|
| }
|
|
|
| // Verify delegate behavior when packets are acked before the
|
| @@ -416,7 +418,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataAckNotificationBeforeFlush) {
|
| EXPECT_TRUE(write_blocked_list_->HasWriteBlockedStreams());
|
|
|
| // Handle the ack of the first write.
|
| - proxy_delegate->OnAckNotification(1, 2, 3, 4);
|
| + proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
|
| proxy_delegate = NULL;
|
|
|
| EXPECT_CALL(*session_, WritevData(kStreamId, _, _, _, _)).WillOnce(DoAll(
|
| @@ -426,8 +428,8 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataAckNotificationBeforeFlush) {
|
| stream_->OnCanWrite();
|
|
|
| // Handle the ack for the second write.
|
| - EXPECT_CALL(*delegate, OnAckNotification(101, 202, 303, 404));
|
| - proxy_delegate->OnAckNotification(100, 200, 300, 400);
|
| + EXPECT_CALL(*delegate, OnAckNotification(101, 202, 303, 404, zero_));
|
| + proxy_delegate->OnAckNotification(100, 200, 300, 400, zero_);
|
| }
|
|
|
| // Verify delegate behavior when WriteOrBufferData does not buffer.
|
| @@ -447,8 +449,8 @@ TEST_F(ReliableQuicStreamTest, WriteAndBufferDataWithAckNotiferNoBuffer) {
|
| EXPECT_FALSE(write_blocked_list_->HasWriteBlockedStreams());
|
|
|
| // Handle the ack.
|
| - EXPECT_CALL(*delegate, OnAckNotification(1, 2, 3, 4));
|
| - proxy_delegate->OnAckNotification(1, 2, 3, 4);
|
| + EXPECT_CALL(*delegate, OnAckNotification(1, 2, 3, 4, zero_));
|
| + proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
|
| }
|
|
|
| // Verify delegate behavior when WriteOrBufferData buffers all the data.
|
| @@ -472,8 +474,8 @@ TEST_F(ReliableQuicStreamTest, BufferOnWriteAndBufferDataWithAckNotifer) {
|
| stream_->OnCanWrite();
|
|
|
| // Handle the ack.
|
| - EXPECT_CALL(*delegate, OnAckNotification(1, 2, 3, 4));
|
| - proxy_delegate->OnAckNotification(1, 2, 3, 4);
|
| + EXPECT_CALL(*delegate, OnAckNotification(1, 2, 3, 4, zero_));
|
| + proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
|
| }
|
|
|
| // Verify delegate behavior when WriteOrBufferData when the FIN is
|
| @@ -500,9 +502,9 @@ TEST_F(ReliableQuicStreamTest, WriteAndBufferDataWithAckNotiferOnlyFinRemains) {
|
| stream_->OnCanWrite();
|
|
|
| // Handle the acks.
|
| - proxy_delegate->OnAckNotification(1, 2, 3, 4);
|
| - EXPECT_CALL(*delegate, OnAckNotification(11, 22, 33, 44));
|
| - proxy_delegate->OnAckNotification(10, 20, 30, 40);
|
| + proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
|
| + EXPECT_CALL(*delegate, OnAckNotification(11, 22, 33, 44, zero_));
|
| + proxy_delegate->OnAckNotification(10, 20, 30, 40, zero_);
|
| }
|
|
|
| } // namespace
|
|
|