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

Side by Side Diff: net/quic/congestion_control/inter_arrival_sender_test.cc

Issue 126283002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed extra space Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/congestion_control/inter_arrival_sender.h" 5 #include "net/quic/congestion_control/inter_arrival_sender.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/quic/test_tools/mock_clock.h" 10 #include "net/quic/test_tools/mock_clock.h"
(...skipping 13 matching lines...) Expand all
24 nine_ms_(QuicTime::Delta::FromMilliseconds(9)), 24 nine_ms_(QuicTime::Delta::FromMilliseconds(9)),
25 send_start_time_(send_clock_.Now()), 25 send_start_time_(send_clock_.Now()),
26 sender_(&send_clock_), 26 sender_(&send_clock_),
27 sequence_number_(1), 27 sequence_number_(1),
28 acked_sequence_number_(1), 28 acked_sequence_number_(1),
29 feedback_sequence_number_(1) { 29 feedback_sequence_number_(1) {
30 send_clock_.AdvanceTime(one_ms_); 30 send_clock_.AdvanceTime(one_ms_);
31 receive_clock_.AdvanceTime(one_ms_); 31 receive_clock_.AdvanceTime(one_ms_);
32 } 32 }
33 33
34 virtual ~InterArrivalSenderTest() { 34 virtual ~InterArrivalSenderTest() OVERRIDE {
35 STLDeleteValues(&sent_packets_); 35 STLDeleteValues(&sent_packets_);
36 } 36 }
37 37
38 void SendAvailableCongestionWindow() { 38 void SendAvailableCongestionWindow() {
39 while (sender_.TimeUntilSend(send_clock_.Now(), 39 while (sender_.TimeUntilSend(send_clock_.Now(),
40 NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA, NOT_HANDSHAKE).IsZero()) { 40 NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA, NOT_HANDSHAKE).IsZero()) {
41 QuicByteCount bytes_in_packet = kDefaultMaxPacketSize; 41 QuicByteCount bytes_in_packet = kDefaultMaxPacketSize;
42 sent_packets_[sequence_number_] = 42 sent_packets_[sequence_number_] =
43 new class SendAlgorithmInterface::SentPacket( 43 new class SendAlgorithmInterface::SentPacket(
44 bytes_in_packet, send_clock_.Now()); 44 bytes_in_packet, send_clock_.Now());
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 acked_sequence_number_ += 2; // Create a loss by not acking both packets. 560 acked_sequence_number_ += 2; // Create a loss by not acking both packets.
561 SendFeedbackMessageNPackets(2, nine_ms_, nine_ms_); 561 SendFeedbackMessageNPackets(2, nine_ms_, nine_ms_);
562 562
563 // Make sure our bitrate is fixed at the expected_min_bitrate. 563 // Make sure our bitrate is fixed at the expected_min_bitrate.
564 EXPECT_EQ(expected_min_bitrate, sender_.BandwidthEstimate()); 564 EXPECT_EQ(expected_min_bitrate, sender_.BandwidthEstimate());
565 } 565 }
566 } 566 }
567 567
568 } // namespace test 568 } // namespace test
569 } // namespace net 569 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/inter_arrival_sender.cc ('k') | net/quic/congestion_control/pacing_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698