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

Unified Diff: net/tools/quic/quic_server_session_test.cc

Issue 1142543002: Fixing a bug in the QUIC code where we could create new streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_stateless_reject_92677792
Patch Set: Created 5 years, 7 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/tools/quic/quic_server_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server_session_test.cc
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index 665ca6bc18ee38f88872a9d0f15f9d258c3843f2..b48021b9b6a565035fdda7b40d8caebc697e6449 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -18,6 +18,7 @@
#include "net/quic/test_tools/quic_session_peer.h"
#include "net/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
+#include "net/test/gtest_util.h"
#include "net/tools/quic/quic_spdy_server_stream.h"
#include "net/tools/quic/test_tools/quic_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -262,6 +263,13 @@ TEST_P(QuicServerSessionTest, GetEvenIncomingError) {
QuicServerSessionPeer::GetIncomingDataStream(session_.get(), 4));
}
+TEST_P(QuicServerSessionTest, GetStreamDisconnected) {
+ // Don't create new streams if the connection is disconnected.
+ QuicConnectionPeer::CloseConnection(connection_);
+ EXPECT_DFATAL(QuicServerSessionPeer::GetIncomingDataStream(session_.get(), 4),
+ "ShouldCreateIncomingDataStream called when disconnected");
+}
+
TEST_P(QuicServerSessionTest, SetFecProtectionFromConfig) {
ValueRestore<bool> old_flag(&FLAGS_enable_quic_fec, true);
« no previous file with comments | « net/tools/quic/quic_server_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698