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

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

Issue 1433433003: Rename MockHelper to the more descriptive (and more consistent with other Mock classes) MockConnect… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106414015
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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_spdy_stream_test.cc ('k') | net/quic/reliable_quic_stream_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/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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 frame.offset = byte_offset; 140 frame.offset = byte_offset;
141 frame.data = StringPiece(data); 141 frame.data = StringPiece(data);
142 frame.fin = false; 142 frame.fin = false;
143 sequencer_->OnStreamFrame(frame); 143 sequencer_->OnStreamFrame(frame);
144 } 144 }
145 145
146 size_t NumBufferedBytes() { 146 size_t NumBufferedBytes() {
147 return QuicStreamSequencerPeer::GetNumBufferedBytes(sequencer_.get()); 147 return QuicStreamSequencerPeer::GetNumBufferedBytes(sequencer_.get());
148 } 148 }
149 149
150 MockHelper helper_; 150 MockConnectionHelper helper_;
151 MockConnection* connection_; 151 MockConnection* connection_;
152 MockClock clock_; 152 MockClock clock_;
153 MockQuicSpdySession session_; 153 MockQuicSpdySession session_;
154 testing::StrictMock<MockStream> stream_; 154 testing::StrictMock<MockStream> stream_;
155 scoped_ptr<QuicStreamSequencer> sequencer_; 155 scoped_ptr<QuicStreamSequencer> sequencer_;
156 }; 156 };
157 157
158 // TODO(rch): reorder these tests so they build on each other. 158 // TODO(rch): reorder these tests so they build on each other.
159 159
160 TEST_F(QuicStreamSequencerTest, RejectOldFrame) { 160 TEST_F(QuicStreamSequencerTest, RejectOldFrame) {
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 EXPECT_EQ(timestamp, t1); 688 EXPECT_EQ(timestamp, t1);
689 QuicStreamSequencerTest::ConsumeData(3); 689 QuicStreamSequencerTest::ConsumeData(3);
690 EXPECT_EQ(0u, NumBufferedBytes()); 690 EXPECT_EQ(0u, NumBufferedBytes());
691 EXPECT_EQ(6u, sequencer_->NumBytesConsumed()); 691 EXPECT_EQ(6u, sequencer_->NumBytesConsumed());
692 EXPECT_EQ(0u, sequencer_->NumBytesBuffered()); 692 EXPECT_EQ(0u, sequencer_->NumBytesBuffered());
693 } 693 }
694 694
695 } // namespace 695 } // namespace
696 } // namespace test 696 } // namespace test
697 } // namespace net 697 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_stream_test.cc ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698