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

Unified Diff: webrtc/p2p/quic/quicsession_unittest.cc

Issue 1856513002: Add QuicTransportChannel methods for QUIC streams (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add back quicsession.h comment Created 4 years, 8 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 | « webrtc/p2p/quic/quicsession.cc ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/quic/quicsession_unittest.cc
diff --git a/webrtc/p2p/quic/quicsession_unittest.cc b/webrtc/p2p/quic/quicsession_unittest.cc
index 2e2d6ae0a6af3a77bf7516d1d53fd2dd1014b3de..04b7d1ee7faa1b948844e2b8cf8d2df6ed4c89ca 100644
--- a/webrtc/p2p/quic/quicsession_unittest.cc
+++ b/webrtc/p2p/quic/quicsession_unittest.cc
@@ -450,3 +450,17 @@ TEST_F(QuicSessionTest, CannotCreateDataStreamBeforeHandshake) {
EXPECT_EQ(nullptr, server_peer_->CreateOutgoingDynamicStream(5));
EXPECT_EQ(nullptr, client_peer_->CreateOutgoingDynamicStream(5));
}
+
+// Test that closing a QUIC stream causes the QuicSession to remove it.
+TEST_F(QuicSessionTest, CloseQuicStream) {
+ CreateClientAndServerSessions();
+ StartHandshake(true, true);
+ ASSERT_TRUE_WAIT(client_peer_->IsCryptoHandshakeConfirmed() &&
+ server_peer_->IsCryptoHandshakeConfirmed(),
+ kTimeoutMs);
+ ReliableQuicStream* stream = client_peer_->CreateOutgoingDynamicStream(5);
+ ASSERT_NE(nullptr, stream);
+ EXPECT_FALSE(client_peer_->IsClosedStream(stream->id()));
+ stream->Close();
+ EXPECT_TRUE(client_peer_->IsClosedStream(stream->id()));
+}
« no previous file with comments | « webrtc/p2p/quic/quicsession.cc ('k') | webrtc/p2p/quic/quictransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698