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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "crypto/ec_private_key.h" | 10 #include "crypto/ec_private_key.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 bool compressed, | 169 bool compressed, |
170 int stream_id, | 170 int stream_id, |
171 RequestPriority request_priority, | 171 RequestPriority request_priority, |
172 SpdyControlType type, | 172 SpdyControlType type, |
173 SpdyControlFlags flags, | 173 SpdyControlFlags flags, |
174 const char* const* kHeaders, | 174 const char* const* kHeaders, |
175 int kHeadersSize); | 175 int kHeadersSize); |
176 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[], | 176 SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[], |
177 int extra_header_count, | 177 int extra_header_count, |
178 bool compressed, | 178 bool compressed, |
179 int stream_id, | 179 SpdyStreamId stream_id, |
180 RequestPriority request_priority, | 180 RequestPriority request_priority, |
181 SpdyControlType type, | 181 SpdyControlType type, |
182 SpdyControlFlags flags, | 182 SpdyControlFlags flags, |
183 const char* const* kHeaders, | 183 const char* const* kHeaders, |
184 int kHeadersSize, | 184 int kHeadersSize, |
185 int associated_stream_id); | 185 SpdyStreamId associated_stream_id); |
186 | 186 |
187 // Construct an expected SPDY reply string. | 187 // Construct an expected SPDY reply string. |
188 // |extra_headers| are the extra header-value pairs, which typically | 188 // |extra_headers| are the extra header-value pairs, which typically |
189 // will vary the most between calls. | 189 // will vary the most between calls. |
190 // |buffer| is the buffer we're filling in. | 190 // |buffer| is the buffer we're filling in. |
191 // Returns the number of bytes written into |buffer|. | 191 // Returns the number of bytes written into |buffer|. |
192 int ConstructSpdyReplyString(const char* const extra_headers[], | 192 int ConstructSpdyReplyString(const char* const extra_headers[], |
193 int extra_header_count, | 193 int extra_header_count, |
194 char* buffer, | 194 char* buffer, |
195 int buffer_length); | 195 int buffer_length); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 int buffer_length, | 232 int buffer_length, |
233 int index); | 233 int index); |
234 | 234 |
235 // Constructs a standard SPDY GET SYN packet, optionally compressed | 235 // Constructs a standard SPDY GET SYN packet, optionally compressed |
236 // for the url |url|. | 236 // for the url |url|. |
237 // |extra_headers| are the extra header-value pairs, which typically | 237 // |extra_headers| are the extra header-value pairs, which typically |
238 // will vary the most between calls. | 238 // will vary the most between calls. |
239 // Returns a SpdyFrame. | 239 // Returns a SpdyFrame. |
240 SpdyFrame* ConstructSpdyGet(const char* const url, | 240 SpdyFrame* ConstructSpdyGet(const char* const url, |
241 bool compressed, | 241 bool compressed, |
242 int stream_id, | 242 SpdyStreamId stream_id, |
243 RequestPriority request_priority); | 243 RequestPriority request_priority); |
244 | 244 |
245 // Constructs a standard SPDY GET SYN packet, optionally compressed. | 245 // Constructs a standard SPDY GET SYN packet, optionally compressed. |
246 // |extra_headers| are the extra header-value pairs, which typically | 246 // |extra_headers| are the extra header-value pairs, which typically |
247 // will vary the most between calls. | 247 // will vary the most between calls. |
248 // Returns a SpdyFrame. | 248 // Returns a SpdyFrame. |
249 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], | 249 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
250 int extra_header_count, | 250 int extra_header_count, |
251 bool compressed, | 251 bool compressed, |
252 int stream_id, | 252 int stream_id, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 SpdySessionPool* const pool_; | 457 SpdySessionPool* const pool_; |
458 | 458 |
459 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); | 459 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); |
460 }; | 460 }; |
461 | 461 |
462 } // namespace test_spdy3 | 462 } // namespace test_spdy3 |
463 | 463 |
464 } // namespace net | 464 } // namespace net |
465 | 465 |
466 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 466 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
OLD | NEW |