OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/mock_host_resolver.h" | 10 #include "net/base/mock_host_resolver.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Constructs a standard SPDY GET SYN packet, optionally compressed. | 193 // Constructs a standard SPDY GET SYN packet, optionally compressed. |
194 // |extra_headers| are the extra header-value pairs, which typically | 194 // |extra_headers| are the extra header-value pairs, which typically |
195 // will vary the most between calls. | 195 // will vary the most between calls. |
196 // Returns a SpdyFrame. | 196 // Returns a SpdyFrame. |
197 spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], | 197 spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
198 int extra_header_count, | 198 int extra_header_count, |
199 bool compressed, | 199 bool compressed, |
200 int stream_id, | 200 int stream_id, |
201 RequestPriority request_priority); | 201 RequestPriority request_priority); |
202 | 202 |
| 203 // Constructs a standard SPDY GET SYN packet, optionally compressed. |
| 204 // |extra_headers| are the extra header-value pairs, which typically |
| 205 // will vary the most between calls. If |direct| is false, the |
| 206 // the full url will be used instead of simply the path. |
| 207 // Returns a SpdyFrame. |
| 208 spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
| 209 int extra_header_count, |
| 210 bool compressed, |
| 211 int stream_id, |
| 212 RequestPriority request_priority, |
| 213 bool direct); |
| 214 |
203 // Constructs a standard SPDY push SYN packet. | 215 // Constructs a standard SPDY push SYN packet. |
204 // |extra_headers| are the extra header-value pairs, which typically | 216 // |extra_headers| are the extra header-value pairs, which typically |
205 // will vary the most between calls. | 217 // will vary the most between calls. |
206 // Returns a SpdyFrame. | 218 // Returns a SpdyFrame. |
207 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], | 219 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], |
208 int extra_header_count, | 220 int extra_header_count, |
209 int stream_id, | 221 int stream_id, |
210 int associated_stream_id); | 222 int associated_stream_id); |
211 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], | 223 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], |
212 int extra_header_count, | 224 int extra_header_count, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 388 |
377 private: | 389 private: |
378 MockClientSocketFactory socket_factory_; | 390 MockClientSocketFactory socket_factory_; |
379 scoped_refptr<SpdySessionPool> spdy_session_pool_; | 391 scoped_refptr<SpdySessionPool> spdy_session_pool_; |
380 }; | 392 }; |
381 | 393 |
382 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type); | 394 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type); |
383 } // namespace net | 395 } // namespace net |
384 | 396 |
385 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 397 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
OLD | NEW |