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

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

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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_received_packet_manager_test.cc ('k') | net/quic/quic_sent_packet_manager.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_reliable_client_stream.h" 5 #include "net/quic/quic_reliable_client_stream.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/base/test_completion_callback.h" 8 #include "net/base/test_completion_callback.h"
9 #include "net/quic/quic_chromium_client_session.h" 9 #include "net/quic/quic_chromium_client_session.h"
10 #include "net/quic/quic_utils.h" 10 #include "net/quic/quic_utils.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void ReadData(StringPiece expected_data) { 91 void ReadData(StringPiece expected_data) {
92 scoped_refptr<IOBuffer> buffer(new IOBuffer(expected_data.length() + 1)); 92 scoped_refptr<IOBuffer> buffer(new IOBuffer(expected_data.length() + 1));
93 EXPECT_EQ(static_cast<int>(expected_data.length()), 93 EXPECT_EQ(static_cast<int>(expected_data.length()),
94 stream_->Read(buffer.get(), expected_data.length() + 1)); 94 stream_->Read(buffer.get(), expected_data.length() + 1));
95 EXPECT_EQ(expected_data, 95 EXPECT_EQ(expected_data,
96 StringPiece(buffer->data(), expected_data.length())); 96 StringPiece(buffer->data(), expected_data.length()));
97 } 97 }
98 98
99 QuicCryptoClientConfig crypto_config_; 99 QuicCryptoClientConfig crypto_config_;
100 testing::StrictMock<MockDelegate> delegate_; 100 testing::StrictMock<MockDelegate> delegate_;
101 MockHelper helper_; 101 MockConnectionHelper helper_;
102 MockQuicSpdySession session_; 102 MockQuicSpdySession session_;
103 QuicReliableClientStream* stream_; 103 QuicReliableClientStream* stream_;
104 SpdyHeaderBlock headers_; 104 SpdyHeaderBlock headers_;
105 }; 105 };
106 106
107 INSTANTIATE_TEST_CASE_P(Version, QuicReliableClientStreamTest, 107 INSTANTIATE_TEST_CASE_P(Version, QuicReliableClientStreamTest,
108 ::testing::ValuesIn(QuicSupportedVersions())); 108 ::testing::ValuesIn(QuicSupportedVersions()));
109 109
110 TEST_P(QuicReliableClientStreamTest, OnFinRead) { 110 TEST_P(QuicReliableClientStreamTest, OnFinRead) {
111 InitializeHeaders(); 111 InitializeHeaders();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _, _)).WillOnce( 233 EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _, _)).WillOnce(
234 Return(QuicConsumedData(kDataLen, true))); 234 Return(QuicConsumedData(kDataLen, true)));
235 stream_->OnCanWrite(); 235 stream_->OnCanWrite();
236 ASSERT_TRUE(callback.have_result()); 236 ASSERT_TRUE(callback.have_result());
237 EXPECT_EQ(OK, callback.WaitForResult()); 237 EXPECT_EQ(OK, callback.WaitForResult());
238 } 238 }
239 239
240 } // namespace 240 } // namespace
241 } // namespace test 241 } // namespace test
242 } // namespace net 242 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_received_packet_manager_test.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698