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

Side by Side Diff: net/quic/quic_connection_test.cc

Issue 852513002: QUIC - minor cleanup changes to keep source in sync with internal source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@updates_quic_client_bin_cc_83518478
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 size_t data_and_fec = QuicSentPacketManagerPeer::GetBytesInFlight(manager); 1697 size_t data_and_fec = QuicSentPacketManagerPeer::GetBytesInFlight(manager);
1698 EXPECT_LT(0u, data_and_fec); 1698 EXPECT_LT(0u, data_and_fec);
1699 1699
1700 clock_.AdvanceTime(DefaultRetransmissionTime()); 1700 clock_.AdvanceTime(DefaultRetransmissionTime());
1701 1701
1702 // On RTO, both data and FEC packets are removed from inflight, 1702 // On RTO, both data and FEC packets are removed from inflight,
1703 // and retransmission of the data (but not FEC) gets added into the inflight. 1703 // and retransmission of the data (but not FEC) gets added into the inflight.
1704 EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true)); 1704 EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
1705 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); 1705 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
1706 connection_.GetRetransmissionAlarm()->Fire(); 1706 connection_.GetRetransmissionAlarm()->Fire();
1707 ;
1708 1707
1709 size_t data_only = QuicSentPacketManagerPeer::GetBytesInFlight(manager); 1708 size_t data_only = QuicSentPacketManagerPeer::GetBytesInFlight(manager);
1710 EXPECT_LT(0u, data_only); 1709 EXPECT_LT(0u, data_only);
1711 EXPECT_GE(data_and_fec, 2 * data_only); 1710 EXPECT_GE(data_and_fec, 2 * data_only);
1712 1711
1713 // Receive ack for the retransmission. No data should be outstanding. 1712 // Receive ack for the retransmission. No data should be outstanding.
1714 QuicAckFrame ack = InitAckFrame(3); 1713 QuicAckFrame ack = InitAckFrame(3);
1715 NackPacket(1, &ack); 1714 NackPacket(1, &ack);
1716 NackPacket(2, &ack); 1715 NackPacket(2, &ack);
1717 SequenceNumberSet lost_packets; 1716 SequenceNumberSet lost_packets;
(...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after
4335 // Regression test for b/18594622 4334 // Regression test for b/18594622
4336 scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate); 4335 scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
4337 EXPECT_DFATAL( 4336 EXPECT_DFATAL(
4338 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()), 4337 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()),
4339 "Attempt to send empty stream frame"); 4338 "Attempt to send empty stream frame");
4340 } 4339 }
4341 4340
4342 } // namespace 4341 } // namespace
4343 } // namespace test 4342 } // namespace test
4344 } // namespace net 4343 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698