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 #include "net/spdy/spdy_test_util_spdy3.h" | 5 #include "net/spdy/spdy_test_util_spdy3.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 request_priority, | 109 request_priority, |
110 type, | 110 type, |
111 flags, | 111 flags, |
112 kHeaders, | 112 kHeaders, |
113 kHeadersSize, | 113 kHeadersSize, |
114 associated_stream_id); | 114 associated_stream_id); |
115 } | 115 } |
116 | 116 |
117 } // namespace | 117 } // namespace |
118 | 118 |
119 SpdyFrame* ConstructSpdyConnect(const char* const extra_headers[], | |
120 int extra_header_count, | |
121 int stream_id) { | |
122 const char* const kConnectHeaders[] = { | |
123 ":method", "CONNECT", | |
124 ":path", "www.google.com:443", | |
125 ":host", "www.google.com", | |
126 ":version", "HTTP/1.1", | |
127 }; | |
128 return ConstructSpdyControlFrame(extra_headers, | |
129 extra_header_count, | |
130 /*compressed*/ false, | |
131 stream_id, | |
132 LOWEST, | |
133 SYN_STREAM, | |
134 CONTROL_FLAG_NONE, | |
135 kConnectHeaders, | |
136 arraysize(kConnectHeaders), | |
137 0); | |
138 } | |
139 | |
140 SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], | 119 SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], |
141 int extra_header_count, | 120 int extra_header_count, |
142 int stream_id, | 121 int stream_id, |
143 int associated_stream_id) { | 122 int associated_stream_id) { |
144 const char* const kStandardPushHeaders[] = { | 123 const char* const kStandardPushHeaders[] = { |
145 "hello", "bye", | 124 "hello", "bye", |
146 ":status", "200", | 125 ":status", "200", |
147 ":version", "HTTP/1.1" | 126 ":version", "HTTP/1.1" |
148 }; | 127 }; |
149 return ConstructSpdyControlFrame(extra_headers, | 128 return ConstructSpdyControlFrame(extra_headers, |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 NULL, // Data | 389 NULL, // Data |
411 0, // Length | 390 0, // Length |
412 DATA_FLAG_NONE // Data Flags | 391 DATA_FLAG_NONE // Data Flags |
413 }; | 392 }; |
414 return kHeader; | 393 return kHeader; |
415 } | 394 } |
416 | 395 |
417 } // namespace test_spdy3 | 396 } // namespace test_spdy3 |
418 | 397 |
419 } // namespace net | 398 } // namespace net |
OLD | NEW |