| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "net/base/cert_verifier.h" | 10 #include "net/base/cert_verifier.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 int stream_id); | 273 int stream_id); |
| 274 | 274 |
| 275 // Constructs a standard SPDY POST SYN packet. | 275 // Constructs a standard SPDY POST SYN packet. |
| 276 // |extra_headers| are the extra header-value pairs, which typically | 276 // |extra_headers| are the extra header-value pairs, which typically |
| 277 // will vary the most between calls. | 277 // will vary the most between calls. |
| 278 // Returns a SpdyFrame. | 278 // Returns a SpdyFrame. |
| 279 spdy::SpdyFrame* ConstructSpdyPost(int64 content_length, | 279 spdy::SpdyFrame* ConstructSpdyPost(int64 content_length, |
| 280 const char* const extra_headers[], | 280 const char* const extra_headers[], |
| 281 int extra_header_count); | 281 int extra_header_count); |
| 282 | 282 |
| 283 // Constructs a chunked transfer SPDY POST SYN packet. |
| 284 // |extra_headers| are the extra header-value pairs, which typically |
| 285 // will vary the most between calls. |
| 286 // Returns a SpdyFrame. |
| 287 spdy::SpdyFrame* ConstructChunkedSpdyPost(const char* const extra_headers[], |
| 288 int extra_header_count); |
| 289 |
| 283 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY POST. | 290 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY POST. |
| 284 // |extra_headers| are the extra header-value pairs, which typically | 291 // |extra_headers| are the extra header-value pairs, which typically |
| 285 // will vary the most between calls. | 292 // will vary the most between calls. |
| 286 // Returns a SpdyFrame. | 293 // Returns a SpdyFrame. |
| 287 spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[], | 294 spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[], |
| 288 int extra_header_count); | 295 int extra_header_count); |
| 289 | 296 |
| 290 // Constructs a single SPDY data frame with the contents "hello!" | 297 // Constructs a single SPDY data frame with the contents "hello!" |
| 291 spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id, | 298 spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id, |
| 292 bool fin); | 299 bool fin); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 virtual ~SpdyURLRequestContext(); | 364 virtual ~SpdyURLRequestContext(); |
| 358 | 365 |
| 359 private: | 366 private: |
| 360 MockClientSocketFactory socket_factory_; | 367 MockClientSocketFactory socket_factory_; |
| 361 }; | 368 }; |
| 362 | 369 |
| 363 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type); | 370 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type); |
| 364 } // namespace net | 371 } // namespace net |
| 365 | 372 |
| 366 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 373 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
| OLD | NEW |