OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_data_stream.h" | 5 #include "net/quic/quic_data_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_flags.h" | 9 #include "net/quic/quic_flags.h" |
10 #include "net/quic/quic_utils.h" | 10 #include "net/quic/quic_utils.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 using testing::AnyNumber; | 23 using testing::AnyNumber; |
24 using testing::InSequence; | 24 using testing::InSequence; |
25 using testing::Return; | 25 using testing::Return; |
26 using testing::SaveArg; | 26 using testing::SaveArg; |
27 using testing::StrictMock; | 27 using testing::StrictMock; |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 namespace test { | 30 namespace test { |
31 namespace { | 31 namespace { |
32 | 32 |
33 const QuicConnectionId kStreamId = 3; | 33 // First non-reserved client stream ID. |
| 34 const QuicStreamId kStreamId = 5; |
| 35 |
34 const bool kIsServer = true; | 36 const bool kIsServer = true; |
35 const bool kShouldProcessData = true; | 37 const bool kShouldProcessData = true; |
36 | 38 |
37 class TestStream : public QuicDataStream { | 39 class TestStream : public QuicDataStream { |
38 public: | 40 public: |
39 TestStream(QuicStreamId id, | 41 TestStream(QuicStreamId id, |
40 QuicSession* session, | 42 QuicSession* session, |
41 bool should_process_data) | 43 bool should_process_data) |
42 : QuicDataStream(id, session), | 44 : QuicDataStream(id, session), |
43 should_process_data_(should_process_data) {} | 45 should_process_data_(should_process_data) {} |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 EXPECT_CALL(*connection_, SendBlocked(kStreamId)).Times(0); | 560 EXPECT_CALL(*connection_, SendBlocked(kStreamId)).Times(0); |
559 EXPECT_CALL(*session_, WritevData(kStreamId, _, _, _, _)).WillOnce( | 561 EXPECT_CALL(*session_, WritevData(kStreamId, _, _, _, _)).WillOnce( |
560 Return(QuicConsumedData(0, fin))); | 562 Return(QuicConsumedData(0, fin))); |
561 | 563 |
562 stream_->WriteOrBufferData(body, fin, NULL); | 564 stream_->WriteOrBufferData(body, fin, NULL); |
563 } | 565 } |
564 | 566 |
565 } // namespace | 567 } // namespace |
566 } // namespace test | 568 } // namespace test |
567 } // namespace net | 569 } // namespace net |
OLD | NEW |