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

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

Issue 1433063002: Override ReliableQuicStream::StopReading() to send RST_STREAM+NO_ERROR if CloseWriteSide() is calle… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106978852
Patch Set: Created 5 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/quic_spdy_stream.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_spdy_server_stream_test.cc
diff --git a/net/tools/quic/quic_spdy_server_stream_test.cc b/net/tools/quic/quic_spdy_server_stream_test.cc
index a41989773b4b837a95a3e08e82330320504ab04d..3ff6fe757b9652ab24ffb3fec61256e140b012b0 100644
--- a/net/tools/quic/quic_spdy_server_stream_test.cc
+++ b/net/tools/quic/quic_spdy_server_stream_test.cc
@@ -177,6 +177,25 @@ TEST_P(QuicSpdyServerStreamTest, TestFramingOnePacket) {
EXPECT_EQ(body_, StreamBody());
}
+TEST_P(QuicSpdyServerStreamTest, SendQuicRstStreamNoErrorInStopReading) {
+ EXPECT_CALL(session_, WritevData(_, _, _, _, _, _))
+ .Times(AnyNumber())
+ .WillRepeatedly(Invoke(ConsumeAllData));
+
+ EXPECT_FALSE(stream_->fin_received());
+ EXPECT_FALSE(stream_->rst_received());
+
+ stream_->set_fin_sent(true);
+ stream_->CloseWriteSide();
+
+ if (GetParam() > QUIC_VERSION_28) {
+ EXPECT_CALL(session_, SendRstStream(_, QUIC_STREAM_NO_ERROR, _)).Times(1);
+ } else {
+ EXPECT_CALL(session_, SendRstStream(_, QUIC_STREAM_NO_ERROR, _)).Times(0);
+ }
+ stream_->StopReading();
+}
+
TEST_P(QuicSpdyServerStreamTest, TestFramingExtraData) {
string large_body = "hello world!!!!!!";
« no previous file with comments | « net/quic/quic_spdy_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698