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

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

Issue 1983183002: Landing Recent QUIC changes until 5/14/2016 02:25:25 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "first try to fix link error for win_clang build" Created 4 years, 7 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_buffer.cc ('k') | net/quic/quic_unacked_packet_map.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 <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 MockStream(QuicSession* session, QuicStreamId id) 45 MockStream(QuicSession* session, QuicStreamId id)
46 : ReliableQuicStream(id, session) {} 46 : ReliableQuicStream(id, session) {}
47 47
48 MOCK_METHOD0(OnFinRead, void()); 48 MOCK_METHOD0(OnFinRead, void());
49 MOCK_METHOD0(OnDataAvailable, void()); 49 MOCK_METHOD0(OnDataAvailable, void());
50 MOCK_METHOD2(CloseConnectionWithDetails, 50 MOCK_METHOD2(CloseConnectionWithDetails,
51 void(QuicErrorCode error, const string& details)); 51 void(QuicErrorCode error, const string& details));
52 MOCK_METHOD1(Reset, void(QuicRstStreamErrorCode error)); 52 MOCK_METHOD1(Reset, void(QuicRstStreamErrorCode error));
53 MOCK_METHOD0(OnCanWrite, void()); 53 MOCK_METHOD0(OnCanWrite, void());
54 virtual bool IsFlowControlEnabled() const { return true; } 54 virtual bool IsFlowControlEnabled() const { return true; }
55
56 const IPEndPoint& PeerAddressOfLatestPacket() const override {
57 return peer_address_;
58 }
59
60 protected:
61 IPEndPoint peer_address_ = IPEndPoint(net::test::Any4(), 65535);
55 }; 62 };
56 63
57 namespace { 64 namespace {
58 65
59 static const char kPayload[] = 66 static const char kPayload[] =
60 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 67 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
61 68
62 class QuicStreamSequencerTest : public ::testing::Test { 69 class QuicStreamSequencerTest : public ::testing::Test {
63 public: 70 public:
64 void ConsumeData(size_t num_bytes) { 71 void ConsumeData(size_t num_bytes) {
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 EXPECT_EQ(timestamp, t1); 660 EXPECT_EQ(timestamp, t1);
654 QuicStreamSequencerTest::ConsumeData(3); 661 QuicStreamSequencerTest::ConsumeData(3);
655 EXPECT_EQ(0u, NumBufferedBytes()); 662 EXPECT_EQ(0u, NumBufferedBytes());
656 EXPECT_EQ(6u, sequencer_->NumBytesConsumed()); 663 EXPECT_EQ(6u, sequencer_->NumBytesConsumed());
657 EXPECT_EQ(0u, sequencer_->NumBytesBuffered()); 664 EXPECT_EQ(0u, sequencer_->NumBytesBuffered());
658 } 665 }
659 666
660 } // namespace 667 } // namespace
661 } // namespace test 668 } // namespace test
662 } // namespace net 669 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer_buffer.cc ('k') | net/quic/quic_unacked_packet_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698