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_session_peer.h" | 10 #include "net/quic/test_tools/quic_session_peer.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 SpdyPriority priority, bool fin, bool end)); | 59 SpdyPriority priority, bool fin, bool end)); |
60 MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId stream_id, | 60 MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId stream_id, |
61 uint32 delta_window_size)); | 61 uint32 delta_window_size)); |
62 MOCK_METHOD2(OnCredentialFrameData, bool(const char* credential_data, | 62 MOCK_METHOD2(OnCredentialFrameData, bool(const char* credential_data, |
63 size_t len)); | 63 size_t len)); |
64 MOCK_METHOD1(OnBlocked, void(SpdyStreamId stream_id)); | 64 MOCK_METHOD1(OnBlocked, void(SpdyStreamId stream_id)); |
65 MOCK_METHOD3(OnPushPromise, void(SpdyStreamId stream_id, | 65 MOCK_METHOD3(OnPushPromise, void(SpdyStreamId stream_id, |
66 SpdyStreamId promised_stream_id, | 66 SpdyStreamId promised_stream_id, |
67 bool end)); | 67 bool end)); |
68 MOCK_METHOD2(OnContinuation, void(SpdyStreamId stream_id, bool end)); | 68 MOCK_METHOD2(OnContinuation, void(SpdyStreamId stream_id, bool end)); |
69 MOCK_METHOD6(OnAltSvc, void(SpdyStreamId stream_id, | 69 MOCK_METHOD3(OnAltSvc, |
70 uint32 max_age, | 70 void(SpdyStreamId stream_id, |
71 uint16 port, | 71 StringPiece origin, |
72 StringPiece protocol_id, | 72 const SpdyAltSvcWireFormat::AlternativeService& altsvc)); |
73 StringPiece host, | |
74 StringPiece origin)); | |
75 MOCK_METHOD2(OnUnknownFrame, bool(SpdyStreamId stream_id, int frame_type)); | 73 MOCK_METHOD2(OnUnknownFrame, bool(SpdyStreamId stream_id, int frame_type)); |
76 }; | 74 }; |
77 | 75 |
78 // Run all tests with each version, and client or server | 76 // Run all tests with each version, and client or server |
79 struct TestParams { | 77 struct TestParams { |
80 TestParams(QuicVersion version, Perspective perspective) | 78 TestParams(QuicVersion version, Perspective perspective) |
81 : version(version), perspective(perspective) {} | 79 : version(version), perspective(perspective) {} |
82 | 80 |
83 friend ostream& operator<<(ostream& os, const TestParams& p) { | 81 friend ostream& operator<<(ostream& os, const TestParams& p) { |
84 os << "{ version: " << QuicVersionToString(p.version); | 82 os << "{ version: " << QuicVersionToString(p.version); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 396 } |
399 | 397 |
400 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { | 398 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { |
401 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 399 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
402 headers_stream_)); | 400 headers_stream_)); |
403 } | 401 } |
404 | 402 |
405 } // namespace | 403 } // namespace |
406 } // namespace test | 404 } // namespace test |
407 } // namespace net | 405 } // namespace net |
OLD | NEW |