OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 int extra_header_count); | 530 int extra_header_count); |
531 | 531 |
532 // Constructs a single SPDY data frame with the contents "hello!" | 532 // Constructs a single SPDY data frame with the contents "hello!" |
533 SpdyFrame* ConstructSpdyBodyFrame(int stream_id, | 533 SpdyFrame* ConstructSpdyBodyFrame(int stream_id, |
534 bool fin); | 534 bool fin); |
535 | 535 |
536 // Constructs a single SPDY data frame with the given content. | 536 // Constructs a single SPDY data frame with the given content. |
537 SpdyFrame* ConstructSpdyBodyFrame(int stream_id, const char* data, | 537 SpdyFrame* ConstructSpdyBodyFrame(int stream_id, const char* data, |
538 uint32 len, bool fin); | 538 uint32 len, bool fin); |
539 | 539 |
| 540 // Constructs a single SPDY data frame with the given content and padding. |
| 541 SpdyFrame* ConstructSpdyBodyFrame(int stream_id, |
| 542 const char* data, |
| 543 uint32 len, |
| 544 bool fin, |
| 545 int padding_length); |
| 546 |
540 // Wraps |frame| in the payload of a data frame in stream |stream_id|. | 547 // Wraps |frame| in the payload of a data frame in stream |stream_id|. |
541 SpdyFrame* ConstructWrappedSpdyFrame(const scoped_ptr<SpdyFrame>& frame, | 548 SpdyFrame* ConstructWrappedSpdyFrame(const scoped_ptr<SpdyFrame>& frame, |
542 int stream_id); | 549 int stream_id); |
543 | 550 |
544 const SpdyHeaderInfo MakeSpdyHeader(SpdyFrameType type); | 551 const SpdyHeaderInfo MakeSpdyHeader(SpdyFrameType type); |
545 | 552 |
546 // For versions below SPDY4, adds the version HTTP/1.1 header. | 553 // For versions below SPDY4, adds the version HTTP/1.1 header. |
547 void MaybeAddVersionHeader(SpdyFrameWithNameValueBlockIR* frame_ir) const; | 554 void MaybeAddVersionHeader(SpdyFrameWithNameValueBlockIR* frame_ir) const; |
548 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; | 555 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; |
549 | 556 |
(...skipping 22 matching lines...) Expand all Loading... |
572 base::StringPiece url, | 579 base::StringPiece url, |
573 int64* content_length) const; | 580 int64* content_length) const; |
574 | 581 |
575 const NextProto protocol_; | 582 const NextProto protocol_; |
576 const SpdyMajorVersion spdy_version_; | 583 const SpdyMajorVersion spdy_version_; |
577 }; | 584 }; |
578 | 585 |
579 } // namespace net | 586 } // namespace net |
580 | 587 |
581 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 588 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
OLD | NEW |