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

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

Issue 420393004: Change ReliableQuicStream::OnStreamFrame to return void since the method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@visitor_for_tracegraf_71863508
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/tools/quic/quic_spdy_client_stream.h » ('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_ack_notifier.h" 7 #include "net/quic/quic_ack_notifier.h"
8 #include "net/quic/quic_connection.h" 8 #include "net/quic/quic_connection.h"
9 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_utils.h" 10 #include "net/quic/quic_utils.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 // higher than the receive window offset. 643 // higher than the receive window offset.
644 QuicStreamFrame frame(stream_->id(), false, 644 QuicStreamFrame frame(stream_->id(), false,
645 kInitialSessionFlowControlWindowForTest + 1, 645 kInitialSessionFlowControlWindowForTest + 1,
646 MakeIOVector(".")); 646 MakeIOVector("."));
647 EXPECT_GT(frame.offset, QuicFlowControllerPeer::ReceiveWindowOffset( 647 EXPECT_GT(frame.offset, QuicFlowControllerPeer::ReceiveWindowOffset(
648 stream_->flow_controller())); 648 stream_->flow_controller()));
649 649
650 // Stream should not accept the frame, and the connection should be closed. 650 // Stream should not accept the frame, and the connection should be closed.
651 EXPECT_CALL(*connection_, 651 EXPECT_CALL(*connection_,
652 SendConnectionClose(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA)); 652 SendConnectionClose(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA));
653 EXPECT_FALSE(stream_->OnStreamFrame(frame)); 653 stream_->OnStreamFrame(frame);
654 } 654 }
655 655
656 TEST_F(ReliableQuicStreamTest, FinalByteOffsetFromFin) { 656 TEST_F(ReliableQuicStreamTest, FinalByteOffsetFromFin) {
657 Initialize(kShouldProcessData); 657 Initialize(kShouldProcessData);
658 658
659 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); 659 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset());
660 660
661 QuicStreamFrame stream_frame_no_fin(stream_->id(), false, 1234, 661 QuicStreamFrame stream_frame_no_fin(stream_->id(), false, 1234,
662 MakeIOVector(".")); 662 MakeIOVector("."));
663 stream_->OnStreamFrame(stream_frame_no_fin); 663 stream_->OnStreamFrame(stream_frame_no_fin);
(...skipping 10 matching lines...) Expand all
674 674
675 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); 675 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset());
676 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234); 676 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234);
677 stream_->OnStreamReset(rst_frame); 677 stream_->OnStreamReset(rst_frame);
678 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); 678 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
679 } 679 }
680 680
681 } // namespace 681 } // namespace
682 } // namespace test 682 } // namespace test
683 } // namespace net 683 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/tools/quic/quic_spdy_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698