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

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

Issue 131743009: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use size_t instead of int to fix win_x64 compile error Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/quic/test_tools/crypto_test_utils.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_spdy_compressor.h" 9 #include "net/quic/quic_spdy_compressor.h"
10 #include "net/quic/quic_spdy_decompressor.h" 10 #include "net/quic/quic_spdy_decompressor.h"
11 #include "net/quic/quic_utils.h" 11 #include "net/quic/quic_utils.h"
12 #include "net/quic/quic_write_blocked_list.h"
12 #include "net/quic/spdy_utils.h" 13 #include "net/quic/spdy_utils.h"
13 #include "net/quic/test_tools/quic_session_peer.h" 14 #include "net/quic/test_tools/quic_session_peer.h"
14 #include "net/quic/test_tools/quic_test_utils.h" 15 #include "net/quic/test_tools/quic_test_utils.h"
15 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
16 17
17 using base::StringPiece; 18 using base::StringPiece;
18 using std::min; 19 using std::min;
19 using testing::_; 20 using testing::_;
20 using testing::InSequence; 21 using testing::InSequence;
21 using testing::Return; 22 using testing::Return;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 111 }
111 112
112 protected: 113 protected:
113 MockConnection* connection_; 114 MockConnection* connection_;
114 scoped_ptr<MockSession> session_; 115 scoped_ptr<MockSession> session_;
115 scoped_ptr<TestStream> stream_; 116 scoped_ptr<TestStream> stream_;
116 scoped_ptr<TestStream> stream2_; 117 scoped_ptr<TestStream> stream2_;
117 scoped_ptr<QuicSpdyCompressor> compressor_; 118 scoped_ptr<QuicSpdyCompressor> compressor_;
118 scoped_ptr<QuicSpdyDecompressor> decompressor_; 119 scoped_ptr<QuicSpdyDecompressor> decompressor_;
119 SpdyHeaderBlock headers_; 120 SpdyHeaderBlock headers_;
120 WriteBlockedList<QuicStreamId>* write_blocked_list_; 121 QuicWriteBlockedList* write_blocked_list_;
121 }; 122 };
122 123
123 TEST_F(ReliableQuicStreamTest, WriteAllData) { 124 TEST_F(ReliableQuicStreamTest, WriteAllData) {
124 Initialize(kShouldProcessData); 125 Initialize(kShouldProcessData);
125 126
126 connection_->options()->max_packet_length = 127 connection_->options()->max_packet_length =
127 1 + QuicPacketCreator::StreamFramePacketOverhead( 128 1 + QuicPacketCreator::StreamFramePacketOverhead(
128 connection_->version(), PACKET_8BYTE_GUID, !kIncludeVersion, 129 connection_->version(), PACKET_8BYTE_GUID, !kIncludeVersion,
129 PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP); 130 PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP);
130 EXPECT_CALL(*session_, WritevData(kStreamId, _, 1, _, _, _)).WillOnce( 131 EXPECT_CALL(*session_, WritevData(kStreamId, _, 1, _, _, _)).WillOnce(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error()); 224 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error());
224 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error()); 225 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error());
225 stream_->OnConnectionClosed(QUIC_INTERNAL_ERROR, false); 226 stream_->OnConnectionClosed(QUIC_INTERNAL_ERROR, false);
226 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error()); 227 EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error());
227 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error()); 228 EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error());
228 } 229 }
229 230
230 } // namespace 231 } // namespace
231 } // namespace test 232 } // namespace test
232 } // namespace net 233 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.cc ('k') | net/quic/test_tools/crypto_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698