Index: net/quic/quic_framer_test.cc |
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc |
index 99d8a1dc8d98ca485779a2bf0ddefb72f4eda7a5..0885fe04b75a63ac7d5dcc3dc353671d74ca9b80 100644 |
--- a/net/quic/quic_framer_test.cc |
+++ b/net/quic/quic_framer_test.cc |
@@ -2137,58 +2137,6 @@ TEST_P(QuicFramerTest, CongestionFeedbackFrameInterArrival) { |
} |
} |
-TEST_P(QuicFramerTest, CongestionFeedbackFrameFixRate) { |
- unsigned char packet[] = { |
- // public flags (8 byte connection_id) |
- 0x3C, |
- // connection_id |
- 0x10, 0x32, 0x54, 0x76, |
- 0x98, 0xBA, 0xDC, 0xFE, |
- // packet sequence number |
- 0xBC, 0x9A, 0x78, 0x56, |
- 0x34, 0x12, |
- // private flags |
- 0x00, |
- |
- // frame type (congestion feedback frame) |
- 0x20, |
- // congestion feedback type (fix rate) |
- 0x02, |
- // bitrate_in_bytes_per_second; |
- 0x01, 0x02, 0x03, 0x04, |
- }; |
- |
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false); |
- EXPECT_TRUE(framer_.ProcessPacket(encrypted)); |
- |
- EXPECT_EQ(QUIC_NO_ERROR, framer_.error()); |
- ASSERT_TRUE(visitor_.header_.get()); |
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion)); |
- |
- EXPECT_EQ(0u, visitor_.stream_frames_.size()); |
- ASSERT_EQ(1u, visitor_.congestion_feedback_frames_.size()); |
- const QuicCongestionFeedbackFrame& frame = |
- *visitor_.congestion_feedback_frames_[0]; |
- ASSERT_EQ(kFixRate, frame.type); |
- EXPECT_EQ(static_cast<uint32>(0x04030201), |
- frame.fix_rate.bitrate.ToBytesPerSecond()); |
- |
- // Now test framing boundaries |
- for (size_t i = kQuicFrameTypeSize; i < 6; ++i) { |
- string expected_error; |
- if (i < 2) { |
- expected_error = "Unable to read congestion feedback type."; |
- } else if (i < 6) { |
- expected_error = "Unable to read bitrate."; |
- } |
- CheckProcessingFails( |
- packet, |
- i + GetPacketHeaderSize(PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion, |
- PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP), |
- expected_error, QUIC_INVALID_CONGESTION_FEEDBACK_DATA); |
- } |
-} |
- |
TEST_P(QuicFramerTest, CongestionFeedbackFrameInvalidFeedback) { |
unsigned char packet[] = { |
// public flags (8 byte connection_id) |
@@ -3598,52 +3546,6 @@ TEST_P(QuicFramerTest, BuildStopWaitingPacket) { |
AsChars(packet), arraysize(packet)); |
} |
-TEST_P(QuicFramerTest, BuildCongestionFeedbackFramePacketFixRate) { |
- QuicPacketHeader header; |
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210); |
- header.public_header.reset_flag = false; |
- header.public_header.version_flag = false; |
- header.fec_flag = false; |
- header.entropy_flag = false; |
- header.packet_sequence_number = GG_UINT64_C(0x123456789ABC); |
- header.fec_group = 0; |
- |
- QuicCongestionFeedbackFrame congestion_feedback_frame; |
- congestion_feedback_frame.type = kFixRate; |
- congestion_feedback_frame.fix_rate.bitrate |
- = QuicBandwidth::FromBytesPerSecond(0x04030201); |
- |
- QuicFrames frames; |
- frames.push_back(QuicFrame(&congestion_feedback_frame)); |
- |
- unsigned char packet[] = { |
- // public flags (8 byte connection_id) |
- 0x3C, |
- // connection_id |
- 0x10, 0x32, 0x54, 0x76, |
- 0x98, 0xBA, 0xDC, 0xFE, |
- // packet sequence number |
- 0xBC, 0x9A, 0x78, 0x56, |
- 0x34, 0x12, |
- // private flags |
- 0x00, |
- |
- // frame type (congestion feedback frame) |
- 0x20, |
- // congestion feedback type (fix rate) |
- 0x02, |
- // bitrate_in_bytes_per_second; |
- 0x01, 0x02, 0x03, 0x04, |
- }; |
- |
- scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames)); |
- ASSERT_TRUE(data != NULL); |
- |
- test::CompareCharArraysWithHexError("constructed packet", |
- data->data(), data->length(), |
- AsChars(packet), arraysize(packet)); |
-} |
- |
TEST_P(QuicFramerTest, BuildCongestionFeedbackFramePacketInvalidFeedback) { |
QuicPacketHeader header; |
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210); |
@@ -3656,7 +3558,7 @@ TEST_P(QuicFramerTest, BuildCongestionFeedbackFramePacketInvalidFeedback) { |
QuicCongestionFeedbackFrame congestion_feedback_frame; |
congestion_feedback_frame.type = |
- static_cast<CongestionFeedbackType>(kFixRate + 1); |
+ static_cast<CongestionFeedbackType>(kInterArrival + 1); |
QuicFrames frames; |
frames.push_back(QuicFrame(&congestion_feedback_frame)); |