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

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

Issue 1261273003: relnote: Change the QuicStreamSequencer to call OnDataAvailable instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace DonReading with OnFinRead Created 5 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/quic_stream_sequencer.cc ('k') | net/quic/reliable_quic_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/quic_stream_sequencer.h" 5 #include "net/quic/quic_stream_sequencer.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 TEST_F(QuicStreamSequencerTest, EmptyFrame) { 232 TEST_F(QuicStreamSequencerTest, EmptyFrame) {
233 EXPECT_CALL(stream_, 233 EXPECT_CALL(stream_,
234 CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _)); 234 CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _));
235 OnFrame(0, ""); 235 OnFrame(0, "");
236 EXPECT_EQ(0u, NumBufferedFrames()); 236 EXPECT_EQ(0u, NumBufferedFrames());
237 EXPECT_EQ(0u, sequencer_->num_bytes_consumed()); 237 EXPECT_EQ(0u, sequencer_->num_bytes_consumed());
238 } 238 }
239 239
240 TEST_F(QuicStreamSequencerTest, EmptyFinFrame) { 240 TEST_F(QuicStreamSequencerTest, EmptyFinFrame) {
241 EXPECT_CALL(stream_, OnFinRead()); 241 EXPECT_CALL(stream_, OnDataAvailable());
242 OnFinFrame(0, ""); 242 OnFinFrame(0, "");
243 EXPECT_EQ(0u, NumBufferedFrames()); 243 EXPECT_EQ(0u, NumBufferedFrames());
244 EXPECT_EQ(0u, sequencer_->num_bytes_consumed()); 244 EXPECT_EQ(0u, sequencer_->num_bytes_consumed());
245 } 245 }
246 246
247 TEST_F(QuicStreamSequencerTest, PartialFrameConsumed) { 247 TEST_F(QuicStreamSequencerTest, PartialFrameConsumed) {
248 EXPECT_CALL(stream_, OnDataAvailable()) 248 EXPECT_CALL(stream_, OnDataAvailable())
249 .WillOnce(testing::Invoke( 249 .WillOnce(testing::Invoke(
250 CreateFunctor(this, &QuicStreamSequencerTest::ConsumeData, 2))); 250 CreateFunctor(this, &QuicStreamSequencerTest::ConsumeData, 2)));
251 251
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 QuicStreamFrame frame2(kClientDataStreamId1, false, 2, StringPiece("hello")); 591 QuicStreamFrame frame2(kClientDataStreamId1, false, 2, StringPiece("hello"));
592 EXPECT_TRUE(FrameOverlapsBufferedData(frame2)); 592 EXPECT_TRUE(FrameOverlapsBufferedData(frame2));
593 EXPECT_CALL(stream_, CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _)) 593 EXPECT_CALL(stream_, CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _))
594 .Times(1); 594 .Times(1);
595 sequencer_->OnStreamFrame(frame2); 595 sequencer_->OnStreamFrame(frame2);
596 } 596 }
597 597
598 } // namespace 598 } // namespace
599 } // namespace test 599 } // namespace test
600 } // namespace net 600 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer.cc ('k') | net/quic/reliable_quic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698