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

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

Issue 12806002: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor comment fix Created 7 years, 9 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/quic_utils.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_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/quic_utils.h" 8 #include "net/quic/quic_utils.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE { 31 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE {
32 return 0; 32 return 0;
33 } 33 }
34 using ReliableQuicStream::WriteData; 34 using ReliableQuicStream::WriteData;
35 }; 35 };
36 36
37 class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> { 37 class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> {
38 public: 38 public:
39 ReliableQuicStreamTest() 39 ReliableQuicStreamTest()
40 : connection_(new MockConnection(1, IPEndPoint())), 40 : connection_(new MockConnection(1, IPEndPoint(), false)),
41 session_(connection_, true), 41 session_(connection_, true),
42 stream_(1, &session_) { 42 stream_(1, &session_) {
43 } 43 }
44 44
45 MockConnection* connection_; 45 MockConnection* connection_;
46 MockSession session_; 46 MockSession session_;
47 QuicReliableTestStream stream_; 47 QuicReliableTestStream stream_;
48 }; 48 };
49 49
50 TEST_F(ReliableQuicStreamTest, WriteAllData) { 50 TEST_F(ReliableQuicStreamTest, WriteAllData) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // And finally the end of the bytes_consumed 83 // And finally the end of the bytes_consumed
84 //EXPECT_CALL(session_, WriteData(_, StrEq(&kData2[kDataLen - 2]), _, _)). 84 //EXPECT_CALL(session_, WriteData(_, StrEq(&kData2[kDataLen - 2]), _, _)).
85 EXPECT_CALL(session_, WriteData(_, _, _, _)). 85 EXPECT_CALL(session_, WriteData(_, _, _, _)).
86 WillOnce(Return(QuicConsumedData(2, true))); 86 WillOnce(Return(QuicConsumedData(2, true)));
87 stream_.OnCanWrite(); 87 stream_.OnCanWrite();
88 } 88 }
89 89
90 } // namespace 90 } // namespace
91 } // namespace test 91 } // namespace test
92 } // namespace net 92 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_utils.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