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

Unified Diff: net/quic/quic_connection_test.cc

Issue 667763003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/quic_connection.cc ('k') | net/quic/quic_crypto_server_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index b0844289663e955b3f2d21687b6079b8cab01301..7923be2ecfb06d3403e1acfe5892008c6be13180 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -2813,13 +2813,7 @@ TEST_P(QuicConnectionTest, PingAfterSend) {
clock_.AdvanceTime(QuicTime::Delta::FromSeconds(15));
connection_.GetPingAlarm()->Fire();
EXPECT_EQ(1u, writer_->frame_count());
- if (version() >= QUIC_VERSION_18) {
- ASSERT_EQ(1u, writer_->ping_frames().size());
- } else {
- ASSERT_EQ(1u, writer_->stream_frames().size());
- EXPECT_EQ(kCryptoStreamId, writer_->stream_frames()[0].stream_id);
- EXPECT_EQ(0u, writer_->stream_frames()[0].offset);
- }
+ ASSERT_EQ(1u, writer_->ping_frames().size());
writer_->Reset();
EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false));
@@ -3021,16 +3015,6 @@ TEST_P(QuicConnectionTest, SendDelayedAckOnSecondPacket) {
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
}
-TEST_P(QuicConnectionTest, SendDelayedAckForPing) {
- if (version() < QUIC_VERSION_18) {
- return;
- }
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
- ProcessPingPacket(1);
- EXPECT_TRUE(connection_.GetAckAlarm()->IsSet());
-}
-
TEST_P(QuicConnectionTest, NoAckOnOldNacks) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Drop one packet, triggering a sequence of acks.
@@ -3229,15 +3213,11 @@ TEST_P(QuicConnectionTest, Blocked) {
ProcessFramePacket(QuicFrame(&blocked));
}
-TEST_P(QuicConnectionTest, InvalidPacket) {
- EXPECT_CALL(visitor_,
- OnConnectionClosed(QUIC_INVALID_PACKET_HEADER, false));
+TEST_P(QuicConnectionTest, ZeroBytePacket) {
+ // Don't close the connection for zero byte packets.
+ EXPECT_CALL(visitor_, OnConnectionClosed(_, _)).Times(0);
QuicEncryptedPacket encrypted(nullptr, 0);
connection_.ProcessUdpPacket(IPEndPoint(), IPEndPoint(), encrypted);
- // The connection close packet should have error details.
- ASSERT_FALSE(writer_->connection_close_frames().empty());
- EXPECT_EQ("Unable to read public flags.",
- writer_->connection_close_frames()[0].error_details);
}
TEST_P(QuicConnectionTest, MissingPacketsBeforeLeastUnacked) {
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_crypto_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698