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

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

Issue 424903002: Remove FixRate congestion frame type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_quic_version_15_71718286
Patch Set: Created 6 years, 4 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 | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_framer.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 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 ASSERT_EQ(0u, connection_.NumFecGroups()); 2561 ASSERT_EQ(0u, connection_.NumFecGroups());
2562 } 2562 }
2563 2563
2564 TEST_P(QuicConnectionTest, NoQuicCongestionFeedbackFrame) { 2564 TEST_P(QuicConnectionTest, NoQuicCongestionFeedbackFrame) {
2565 SendAckPacketToPeer(); 2565 SendAckPacketToPeer();
2566 EXPECT_TRUE(writer_->feedback_frames().empty()); 2566 EXPECT_TRUE(writer_->feedback_frames().empty());
2567 } 2567 }
2568 2568
2569 TEST_P(QuicConnectionTest, WithQuicCongestionFeedbackFrame) { 2569 TEST_P(QuicConnectionTest, WithQuicCongestionFeedbackFrame) {
2570 QuicCongestionFeedbackFrame info; 2570 QuicCongestionFeedbackFrame info;
2571 info.type = kFixRate; 2571 info.type = kTCP;
2572 info.fix_rate.bitrate = QuicBandwidth::FromBytesPerSecond(123); 2572 info.tcp.receive_window = 0x4030;
2573 SetFeedback(&info); 2573 SetFeedback(&info);
2574 2574
2575 SendAckPacketToPeer(); 2575 SendAckPacketToPeer();
2576 ASSERT_FALSE(writer_->feedback_frames().empty()); 2576 ASSERT_FALSE(writer_->feedback_frames().empty());
2577 ASSERT_EQ(kFixRate, writer_->feedback_frames()[0].type); 2577 ASSERT_EQ(kTCP, writer_->feedback_frames()[0].type);
2578 ASSERT_EQ(info.fix_rate.bitrate,
2579 writer_->feedback_frames()[0].fix_rate.bitrate);
2580 } 2578 }
2581 2579
2582 TEST_P(QuicConnectionTest, UpdateQuicCongestionFeedbackFrame) { 2580 TEST_P(QuicConnectionTest, UpdateQuicCongestionFeedbackFrame) {
2583 SendAckPacketToPeer(); 2581 SendAckPacketToPeer();
2584 EXPECT_CALL(*receive_algorithm_, RecordIncomingPacket(_, _, _)); 2582 EXPECT_CALL(*receive_algorithm_, RecordIncomingPacket(_, _, _));
2585 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); 2583 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
2586 ProcessPacket(1); 2584 ProcessPacket(1);
2587 } 2585 }
2588 2586
2589 TEST_P(QuicConnectionTest, DontUpdateQuicCongestionFeedbackFrameForRevived) { 2587 TEST_P(QuicConnectionTest, DontUpdateQuicCongestionFeedbackFrameForRevived) {
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
3986 QuicBlockedFrame blocked; 3984 QuicBlockedFrame blocked;
3987 blocked.stream_id = 3; 3985 blocked.stream_id = 3;
3988 EXPECT_CALL(visitor_, OnBlockedFrames(_)); 3986 EXPECT_CALL(visitor_, OnBlockedFrames(_));
3989 ProcessFramePacket(QuicFrame(&blocked)); 3987 ProcessFramePacket(QuicFrame(&blocked));
3990 EXPECT_TRUE(ack_alarm->IsSet()); 3988 EXPECT_TRUE(ack_alarm->IsSet());
3991 } 3989 }
3992 3990
3993 } // namespace 3991 } // namespace
3994 } // namespace test 3992 } // namespace test
3995 } // namespace net 3993 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698