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

Unified Diff: net/quic/congestion_control/quic_congestion_manager_test.cc

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 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/congestion_control/fix_rate_test.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/quic_congestion_manager_test.cc
diff --git a/net/quic/congestion_control/quic_congestion_manager_test.cc b/net/quic/congestion_control/quic_congestion_manager_test.cc
index fb6d2e84c96799363148c2002bfb344c3def9641..8b8f47304fb32648a0f3c200bc06569063da0282 100644
--- a/net/quic/congestion_control/quic_congestion_manager_test.cc
+++ b/net/quic/congestion_control/quic_congestion_manager_test.cc
@@ -39,6 +39,9 @@ class QuicCongestionManagerTest : public ::testing::Test {
void SetUpCongestionType(CongestionFeedbackType congestion_type) {
manager_.reset(new QuicCongestionManagerPeer(&clock_, congestion_type));
}
+
+ static const HasRetransmittableData kIgnored = HAS_RETRANSMITTABLE_DATA;
+
MockClock clock_;
scoped_ptr<QuicCongestionManagerPeer> manager_;
};
@@ -55,10 +58,10 @@ TEST_F(QuicCongestionManagerTest, Bandwidth) {
for (int i = 1; i <= 100; ++i) {
QuicTime::Delta advance_time = manager_->TimeUntilSend(
- clock_.Now(), NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
+ clock_.Now(), NOT_RETRANSMISSION, kIgnored);
clock_.AdvanceTime(advance_time);
EXPECT_TRUE(manager_->TimeUntilSend(
- clock_.Now(), NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA).IsZero());
+ clock_.Now(), NOT_RETRANSMISSION, kIgnored).IsZero());
manager_->SentPacket(i, clock_.Now(), 1000, NOT_RETRANSMISSION);
// Ack the packet we sent.
ack.received_info.largest_observed = i;
@@ -83,7 +86,7 @@ TEST_F(QuicCongestionManagerTest, BandwidthWith1SecondGap) {
++sequence_number) {
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(10));
EXPECT_TRUE(manager_->TimeUntilSend(
- clock_.Now(), NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA).IsZero());
+ clock_.Now(), NOT_RETRANSMISSION, kIgnored).IsZero());
manager_->SentPacket(
sequence_number, clock_.Now(), 1000, NOT_RETRANSMISSION);
// Ack the packet we sent.
@@ -101,7 +104,7 @@ TEST_F(QuicCongestionManagerTest, BandwidthWith1SecondGap) {
EXPECT_TRUE(manager_->SentBandwidth(clock_.Now()).IsZero());
for (int i = 1; i <= 150; ++i) {
EXPECT_TRUE(manager_->TimeUntilSend(
- clock_.Now(), NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA).IsZero());
+ clock_.Now(), NOT_RETRANSMISSION, kIgnored).IsZero());
manager_->SentPacket(i + 100, clock_.Now(), 1000, NOT_RETRANSMISSION);
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(10));
// Ack the packet we sent.
« no previous file with comments | « net/quic/congestion_control/fix_rate_test.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698