| 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_flags.h" | 7 #include "net/quic/quic_flags.h" |
| 8 #include "net/quic/quic_utils.h" | 8 #include "net/quic/quic_utils.h" |
| 9 #include "net/quic/spdy_utils.h" | 9 #include "net/quic/spdy_utils.h" |
| 10 #include "net/quic/test_tools/quic_connection_peer.h" | 10 #include "net/quic/test_tools/quic_connection_peer.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 MOCK_METHOD3(OnHeaders, void(SpdyStreamId stream_id, bool fin, bool end)); | 55 MOCK_METHOD3(OnHeaders, void(SpdyStreamId stream_id, bool fin, bool end)); |
| 56 MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId stream_id, | 56 MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId stream_id, |
| 57 uint32 delta_window_size)); | 57 uint32 delta_window_size)); |
| 58 MOCK_METHOD2(OnCredentialFrameData, bool(const char* credential_data, | 58 MOCK_METHOD2(OnCredentialFrameData, bool(const char* credential_data, |
| 59 size_t len)); | 59 size_t len)); |
| 60 MOCK_METHOD1(OnBlocked, void(SpdyStreamId stream_id)); | 60 MOCK_METHOD1(OnBlocked, void(SpdyStreamId stream_id)); |
| 61 MOCK_METHOD3(OnPushPromise, void(SpdyStreamId stream_id, | 61 MOCK_METHOD3(OnPushPromise, void(SpdyStreamId stream_id, |
| 62 SpdyStreamId promised_stream_id, | 62 SpdyStreamId promised_stream_id, |
| 63 bool end)); | 63 bool end)); |
| 64 MOCK_METHOD2(OnContinuation, void(SpdyStreamId stream_id, bool end)); | 64 MOCK_METHOD2(OnContinuation, void(SpdyStreamId stream_id, bool end)); |
| 65 MOCK_METHOD6(OnAltSvc, void(SpdyStreamId stream_id, |
| 66 uint32 max_age, |
| 67 uint16 port, |
| 68 StringPiece protocol_id, |
| 69 StringPiece host, |
| 70 StringPiece origin)); |
| 65 }; | 71 }; |
| 66 | 72 |
| 67 class QuicHeadersStreamTest : public ::testing::TestWithParam<bool> { | 73 class QuicHeadersStreamTest : public ::testing::TestWithParam<bool> { |
| 68 public: | 74 public: |
| 69 static QuicVersionVector GetVersions() { | 75 static QuicVersionVector GetVersions() { |
| 70 QuicVersionVector versions; | 76 QuicVersionVector versions; |
| 71 versions.push_back(QuicVersionMax()); | 77 versions.push_back(QuicVersionMax()); |
| 72 return versions; | 78 return versions; |
| 73 } | 79 } |
| 74 | 80 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 323 } |
| 318 | 324 |
| 319 TEST_P(QuicHeadersStreamTest, NoFlowControl) { | 325 TEST_P(QuicHeadersStreamTest, NoFlowControl) { |
| 320 ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true); | 326 ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true); |
| 321 EXPECT_FALSE(headers_stream_->flow_controller()->IsEnabled()); | 327 EXPECT_FALSE(headers_stream_->flow_controller()->IsEnabled()); |
| 322 } | 328 } |
| 323 | 329 |
| 324 } // namespace | 330 } // namespace |
| 325 } // namespace test | 331 } // namespace test |
| 326 } // namespace net | 332 } // namespace net |
| OLD | NEW |