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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 void Initialize(bool stream_should_process_data) { | 94 void Initialize(bool stream_should_process_data) { |
95 connection_ = new testing::StrictMock<MockConnection>( | 95 connection_ = new testing::StrictMock<MockConnection>( |
96 kIsServer, SupportedVersions(GetParam())); | 96 kIsServer, SupportedVersions(GetParam())); |
97 session_.reset(new testing::StrictMock<MockSession>(connection_)); | 97 session_.reset(new testing::StrictMock<MockSession>(connection_)); |
98 stream_.reset(new TestStream(kClientDataStreamId1, session_.get(), | 98 stream_.reset(new TestStream(kClientDataStreamId1, session_.get(), |
99 stream_should_process_data)); | 99 stream_should_process_data)); |
100 stream2_.reset(new TestStream(kClientDataStreamId2, session_.get(), | 100 stream2_.reset(new TestStream(kClientDataStreamId2, session_.get(), |
101 stream_should_process_data)); | 101 stream_should_process_data)); |
102 write_blocked_list_ = | 102 write_blocked_list_ = |
103 QuicSessionPeer::GetWriteblockedStreams(session_.get()); | 103 QuicSessionPeer::GetWriteBlockedStreams(session_.get()); |
104 } | 104 } |
105 | 105 |
106 protected: | 106 protected: |
107 MockConnection* connection_; | 107 MockConnection* connection_; |
108 scoped_ptr<MockSession> session_; | 108 scoped_ptr<MockSession> session_; |
109 scoped_ptr<TestStream> stream_; | 109 scoped_ptr<TestStream> stream_; |
110 scoped_ptr<TestStream> stream2_; | 110 scoped_ptr<TestStream> stream2_; |
111 SpdyHeaderBlock headers_; | 111 SpdyHeaderBlock headers_; |
112 QuicWriteBlockedList* write_blocked_list_; | 112 QuicWriteBlockedList* write_blocked_list_; |
113 }; | 113 }; |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 EXPECT_CALL(*connection_, SendBlocked(kClientDataStreamId1)).Times(0); | 560 EXPECT_CALL(*connection_, SendBlocked(kClientDataStreamId1)).Times(0); |
561 EXPECT_CALL(*session_, WritevData(kClientDataStreamId1, _, _, _, _)) | 561 EXPECT_CALL(*session_, WritevData(kClientDataStreamId1, _, _, _, _)) |
562 .WillOnce(Return(QuicConsumedData(0, fin))); | 562 .WillOnce(Return(QuicConsumedData(0, fin))); |
563 | 563 |
564 stream_->WriteOrBufferData(body, fin, NULL); | 564 stream_->WriteOrBufferData(body, fin, NULL); |
565 } | 565 } |
566 | 566 |
567 } // namespace | 567 } // namespace |
568 } // namespace test | 568 } // namespace test |
569 } // namespace net | 569 } // namespace net |
OLD | NEW |