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

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

Issue 1515703004: n/a (delete unused variable in test) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108972403
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_spdy_stream.h" 5 #include "net/quic/quic_spdy_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/quic_write_blocked_list.h" 9 #include "net/quic/quic_write_blocked_list.h"
10 #include "net/quic/spdy_utils.h" 10 #include "net/quic/spdy_utils.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void Initialize(bool stream_should_process_data) { 93 void Initialize(bool stream_should_process_data) {
94 connection_ = new testing::StrictMock<MockConnection>( 94 connection_ = new testing::StrictMock<MockConnection>(
95 &helper_, Perspective::IS_SERVER, SupportedVersions(GetParam())); 95 &helper_, Perspective::IS_SERVER, SupportedVersions(GetParam()));
96 session_.reset(new testing::StrictMock<MockQuicSpdySession>(connection_)); 96 session_.reset(new testing::StrictMock<MockQuicSpdySession>(connection_));
97 stream_.reset(new TestStream(kClientDataStreamId1, session_.get(), 97 stream_.reset(new TestStream(kClientDataStreamId1, session_.get(),
98 stream_should_process_data)); 98 stream_should_process_data));
99 stream2_.reset(new TestStream(kClientDataStreamId2, session_.get(), 99 stream2_.reset(new TestStream(kClientDataStreamId2, session_.get(),
100 stream_should_process_data)); 100 stream_should_process_data));
101 write_blocked_list_ =
102 QuicSessionPeer::GetWriteBlockedStreams(session_.get());
103 } 101 }
104 102
105 protected: 103 protected:
106 MockConnectionHelper helper_; 104 MockConnectionHelper helper_;
107 MockConnection* connection_; 105 MockConnection* connection_;
108 scoped_ptr<MockQuicSpdySession> session_; 106 scoped_ptr<MockQuicSpdySession> session_;
109 scoped_ptr<TestStream> stream_; 107 scoped_ptr<TestStream> stream_;
110 scoped_ptr<TestStream> stream2_; 108 scoped_ptr<TestStream> stream2_;
111 SpdyHeaderBlock headers_; 109 SpdyHeaderBlock headers_;
112 QuicWriteBlockedList* write_blocked_list_;
113 }; 110 };
114 111
115 INSTANTIATE_TEST_CASE_P(Tests, 112 INSTANTIATE_TEST_CASE_P(Tests,
116 QuicSpdyStreamTest, 113 QuicSpdyStreamTest,
117 ::testing::ValuesIn(QuicSupportedVersions())); 114 ::testing::ValuesIn(QuicSupportedVersions()));
118 115
119 TEST_P(QuicSpdyStreamTest, ProcessHeaders) { 116 TEST_P(QuicSpdyStreamTest, ProcessHeaders) {
120 Initialize(kShouldProcessData); 117 Initialize(kShouldProcessData);
121 118
122 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); 119 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 670
674 EXPECT_CALL(*connection_, 671 EXPECT_CALL(*connection_,
675 SendConnectionClose(QUIC_INVALID_HEADERS_STREAM_DATA)) 672 SendConnectionClose(QUIC_INVALID_HEADERS_STREAM_DATA))
676 .Times(1); 673 .Times(1);
677 stream_->OnStreamHeadersComplete(/*fin=*/true, trailers.size()); 674 stream_->OnStreamHeadersComplete(/*fin=*/true, trailers.size());
678 } 675 }
679 676
680 } // namespace 677 } // namespace
681 } // namespace test 678 } // namespace test
682 } // namespace net 679 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698