OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ |
6 #define NET_SPDY_SPDY_TEST_UTIL_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "net/base/cert_verifier.h" | 9 #include "net/base/cert_verifier.h" |
10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 bool compressed, | 129 bool compressed, |
130 int stream_id, | 130 int stream_id, |
131 RequestPriority request_priority, | 131 RequestPriority request_priority, |
132 SpdyControlType type, | 132 SpdyControlType type, |
133 SpdyControlFlags flags, | 133 SpdyControlFlags flags, |
134 const char* const* kHeaders, | 134 const char* const* kHeaders, |
135 int kHeadersSize); | 135 int kHeadersSize); |
136 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[], | 136 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[], |
137 int extra_header_count, | 137 int extra_header_count, |
138 bool compressed, | 138 bool compressed, |
139 int stream_id, | 139 SpdyStreamId stream_id, |
140 RequestPriority request_priority, | 140 RequestPriority request_priority, |
141 SpdyControlType type, | 141 SpdyControlType type, |
142 SpdyControlFlags flags, | 142 SpdyControlFlags flags, |
143 const char* const* kHeaders, | 143 const char* const* kHeaders, |
144 int kHeadersSize, | 144 int kHeadersSize, |
145 int associated_stream_id); | 145 SpdyStreamId associated_stream_id); |
146 | 146 |
147 // Construct an expected SPDY reply string. | 147 // Construct an expected SPDY reply string. |
148 // |extra_headers| are the extra header-value pairs, which typically | 148 // |extra_headers| are the extra header-value pairs, which typically |
149 // will vary the most between calls. | 149 // will vary the most between calls. |
150 // |buffer| is the buffer we're filling in. | 150 // |buffer| is the buffer we're filling in. |
151 // Returns the number of bytes written into |buffer|. | 151 // Returns the number of bytes written into |buffer|. |
152 int ConstructSpdyReplyString(const char* const extra_headers[], | 152 int ConstructSpdyReplyString(const char* const extra_headers[], |
153 int extra_header_count, | 153 int extra_header_count, |
154 char* buffer, | 154 char* buffer, |
155 int buffer_length); | 155 int buffer_length); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 int buffer_length, | 192 int buffer_length, |
193 int index); | 193 int index); |
194 | 194 |
195 // Constructs a standard SPDY GET SYN packet, optionally compressed | 195 // Constructs a standard SPDY GET SYN packet, optionally compressed |
196 // for the url |url|. | 196 // for the url |url|. |
197 // |extra_headers| are the extra header-value pairs, which typically | 197 // |extra_headers| are the extra header-value pairs, which typically |
198 // will vary the most between calls. | 198 // will vary the most between calls. |
199 // Returns a SpdyFrame. | 199 // Returns a SpdyFrame. |
200 SpdyFrame* ConstructSpdyGet(const char* const url, | 200 SpdyFrame* ConstructSpdyGet(const char* const url, |
201 bool compressed, | 201 bool compressed, |
202 int stream_id, | 202 SpdyStreamId stream_id, |
203 RequestPriority request_priority); | 203 RequestPriority request_priority); |
204 | 204 |
205 // Constructs a standard SPDY GET SYN packet, optionally compressed. | 205 // Constructs a standard SPDY GET SYN packet, optionally compressed. |
206 // |extra_headers| are the extra header-value pairs, which typically | 206 // |extra_headers| are the extra header-value pairs, which typically |
207 // will vary the most between calls. | 207 // will vary the most between calls. |
208 // Returns a SpdyFrame. | 208 // Returns a SpdyFrame. |
209 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], | 209 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
210 int extra_header_count, | 210 int extra_header_count, |
211 bool compressed, | 211 bool compressed, |
212 int stream_id, | 212 int stream_id, |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 SpdySessionPool* const pool_; | 416 SpdySessionPool* const pool_; |
417 | 417 |
418 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); | 418 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); |
419 }; | 419 }; |
420 | 420 |
421 } // namespace test_spdy2 | 421 } // namespace test_spdy2 |
422 | 422 |
423 } // namespace net | 423 } // namespace net |
424 | 424 |
425 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 425 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
OLD | NEW |