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

Unified Diff: net/quic/core/quic_connection_test.cc

Issue 2487613002: Landing Recent QUIC changes until 12:43 PM, Nov 5, 2016 UTC+8 (Closed)
Patch Set: Created 4 years, 1 month 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/core/quic_connection_stats.cc ('k') | net/quic/core/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection_test.cc
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc
index 291c733bc60a88756150e257ba886c8a38678f3b..8f4e599046aa76a2fd60249ac996a0b21cd78f75 100644
--- a/net/quic/core/quic_connection_test.cc
+++ b/net/quic/core/quic_connection_test.cc
@@ -4406,6 +4406,8 @@ TEST_P(QuicConnectionTest, Blocked) {
blocked.stream_id = 3;
EXPECT_CALL(visitor_, OnBlockedFrame(_));
ProcessFramePacket(QuicFrame(&blocked));
+ EXPECT_EQ(1u, connection_.GetStats().blocked_frames_received);
+ EXPECT_EQ(0u, connection_.GetStats().blocked_frames_sent);
}
TEST_P(QuicConnectionTest, PathClose) {
@@ -5094,6 +5096,18 @@ TEST_P(QuicConnectionTest, SendPingImmediately) {
EXPECT_FALSE(connection_.HasQueuedData());
}
+TEST_P(QuicConnectionTest, SendBlockedImmediately) {
+ MockQuicConnectionDebugVisitor debug_visitor;
+ connection_.set_debug_visitor(&debug_visitor);
+
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
+ EXPECT_CALL(debug_visitor, OnPacketSent(_, _, _, _, _)).Times(1);
+ EXPECT_EQ(0u, connection_.GetStats().blocked_frames_sent);
+ connection_.SendBlocked(3);
+ EXPECT_EQ(1u, connection_.GetStats().blocked_frames_sent);
+ EXPECT_FALSE(connection_.HasQueuedData());
+}
+
TEST_P(QuicConnectionTest, SendingUnencryptedStreamDataFails) {
EXPECT_CALL(visitor_,
OnConnectionClosed(QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA,
« no previous file with comments | « net/quic/core/quic_connection_stats.cc ('k') | net/quic/core/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698