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

Side by Side Diff: net/quic/reliable_quic_stream_test.cc

Issue 1521993006: Rename QuicSpdyServerStream to QuicSimpleServerStream. No behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@109918216
Patch Set: correct NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ Created 5 years 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 unified diff | Download patch
« no previous file with comments | « net/net.gypi ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "net/quic/quic_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/quic_flags.h" 8 #include "net/quic/quic_flags.h"
9 #include "net/quic/quic_utils.h" 9 #include "net/quic/quic_utils.h"
10 #include "net/quic/quic_write_blocked_list.h" 10 #include "net/quic/quic_write_blocked_list.h"
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 // the request, the received FIN is recorded. 731 // the request, the received FIN is recorded.
732 732
733 Initialize(kShouldProcessData); 733 Initialize(kShouldProcessData);
734 EXPECT_CALL(*connection_, SendConnectionClose(_)).Times(0); 734 EXPECT_CALL(*connection_, SendConnectionClose(_)).Times(0);
735 EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _)) 735 EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _))
736 .WillRepeatedly(Invoke(MockQuicSpdySession::ConsumeAllData)); 736 .WillRepeatedly(Invoke(MockQuicSpdySession::ConsumeAllData));
737 737
738 // Receive data for the request. 738 // Receive data for the request.
739 QuicStreamFrame frame1(stream_->id(), false, 0, StringPiece("Start")); 739 QuicStreamFrame frame1(stream_->id(), false, 0, StringPiece("Start"));
740 stream_->OnStreamFrame(frame1); 740 stream_->OnStreamFrame(frame1);
741 // When QuicSpdyServerStream sends the response, it calls 741 // When QuicSimpleServerStream sends the response, it calls
742 // ReliableQuicStream::CloseReadSide() first. 742 // ReliableQuicStream::CloseReadSide() first.
743 ReliableQuicStreamPeer::CloseReadSide(stream_); 743 ReliableQuicStreamPeer::CloseReadSide(stream_);
744 // Send data and FIN for the response. 744 // Send data and FIN for the response.
745 stream_->WriteOrBufferData(kData1, false, nullptr); 745 stream_->WriteOrBufferData(kData1, false, nullptr);
746 EXPECT_TRUE(ReliableQuicStreamPeer::read_side_closed(stream_)); 746 EXPECT_TRUE(ReliableQuicStreamPeer::read_side_closed(stream_));
747 // Receive remaining data and FIN for the request. 747 // Receive remaining data and FIN for the request.
748 QuicStreamFrame frame2(stream_->id(), true, 0, StringPiece("End")); 748 QuicStreamFrame frame2(stream_->id(), true, 0, StringPiece("End"));
749 stream_->OnStreamFrame(frame2); 749 stream_->OnStreamFrame(frame2);
750 EXPECT_TRUE(stream_->fin_received()); 750 EXPECT_TRUE(stream_->fin_received());
751 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); 751 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
752 } 752 }
753 753
754 } // namespace 754 } // namespace
755 } // namespace test 755 } // namespace test
756 } // namespace net 756 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698