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_headers_stream.h" | 5 #include "net/quic/quic_headers_stream.h" |
6 | 6 |
7 #include "net/quic/quic_utils.h" | 7 #include "net/quic/quic_utils.h" |
8 #include "net/quic/spdy_utils.h" | 8 #include "net/quic/spdy_utils.h" |
9 #include "net/quic/test_tools/quic_connection_peer.h" | 9 #include "net/quic/test_tools/quic_connection_peer.h" |
10 #include "net/quic/test_tools/quic_spdy_session_peer.h" | 10 #include "net/quic/test_tools/quic_spdy_session_peer.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 }; | 241 }; |
242 | 242 |
243 INSTANTIATE_TEST_CASE_P(Tests, | 243 INSTANTIATE_TEST_CASE_P(Tests, |
244 QuicHeadersStreamTest, | 244 QuicHeadersStreamTest, |
245 ::testing::ValuesIn(GetTestParams())); | 245 ::testing::ValuesIn(GetTestParams())); |
246 | 246 |
247 TEST_P(QuicHeadersStreamTest, StreamId) { | 247 TEST_P(QuicHeadersStreamTest, StreamId) { |
248 EXPECT_EQ(3u, headers_stream_->id()); | 248 EXPECT_EQ(3u, headers_stream_->id()); |
249 } | 249 } |
250 | 250 |
251 TEST_P(QuicHeadersStreamTest, EffectivePriority) { | 251 TEST_P(QuicHeadersStreamTest, Priority) { |
252 EXPECT_EQ(0u, headers_stream_->EffectivePriority()); | 252 EXPECT_EQ(0u, headers_stream_->Priority()); |
253 } | 253 } |
254 | 254 |
255 TEST_P(QuicHeadersStreamTest, WriteHeaders) { | 255 TEST_P(QuicHeadersStreamTest, WriteHeaders) { |
256 for (QuicStreamId stream_id = kClientDataStreamId1; | 256 for (QuicStreamId stream_id = kClientDataStreamId1; |
257 stream_id < kClientDataStreamId3; stream_id += 2) { | 257 stream_id < kClientDataStreamId3; stream_id += 2) { |
258 for (bool fin : kFins) { | 258 for (bool fin : kFins) { |
259 if (perspective() == Perspective::IS_SERVER) { | 259 if (perspective() == Perspective::IS_SERVER) { |
260 WriteHeadersAndExpectSynReply(stream_id, fin); | 260 WriteHeadersAndExpectSynReply(stream_id, fin); |
261 } else { | 261 } else { |
262 for (QuicPriority priority = 0; priority < 7; ++priority) { | 262 for (QuicPriority priority = 0; priority < 7; ++priority) { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 } | 506 } |
507 | 507 |
508 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { | 508 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { |
509 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 509 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
510 headers_stream_)); | 510 headers_stream_)); |
511 } | 511 } |
512 | 512 |
513 } // namespace | 513 } // namespace |
514 } // namespace test | 514 } // namespace test |
515 } // namespace net | 515 } // namespace net |
OLD | NEW |