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 #include "net/spdy/spdy_websocket_test_util.h" | 5 #include "net/spdy/spdy_websocket_test_util_spdy2.h" |
6 | 6 |
7 #include "net/spdy/spdy_framer.h" | 7 #include "net/spdy/spdy_framer.h" |
8 #include "net/spdy/spdy_http_utils.h" | 8 #include "net/spdy/spdy_http_utils.h" |
9 #include "net/spdy/spdy_test_util.h" | 9 #include "net/spdy/spdy_test_util_spdy2.h" |
10 | 10 |
11 static const int kDefaultAssociatedStreamId = 0; | 11 static const int kDefaultAssociatedStreamId = 0; |
12 static const bool kDefaultCompressed = false; | 12 static const bool kDefaultCompressed = false; |
13 static const char* const kDefaultDataPointer = NULL; | 13 static const char* const kDefaultDataPointer = NULL; |
14 static const uint32 kDefaultDataLength = 0; | 14 static const uint32 kDefaultDataLength = 0; |
15 static const char** const kDefaultExtraHeaders = NULL; | 15 static const char** const kDefaultExtraHeaders = NULL; |
16 static const int kDefaultExtraHeaderCount = 0; | 16 static const int kDefaultExtraHeaderCount = 0; |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
| 20 namespace test_spdy2 { |
| 21 |
20 spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeRequestFrame( | 22 spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeRequestFrame( |
21 const char* const headers[], | 23 const char* const headers[], |
22 int header_count, | 24 int header_count, |
23 spdy::SpdyStreamId stream_id, | 25 spdy::SpdyStreamId stream_id, |
24 RequestPriority request_priority) { | 26 RequestPriority request_priority) { |
25 | 27 |
26 // SPDY SYN_STREAM control frame header. | 28 // SPDY SYN_STREAM control frame header. |
27 const SpdyHeaderInfo kSynStreamHeader = { | 29 const SpdyHeaderInfo kSynStreamHeader = { |
28 spdy::SYN_STREAM, | 30 spdy::SYN_STREAM, |
29 stream_id, | 31 stream_id, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 85 |
84 // Construct SPDY data frame. | 86 // Construct SPDY data frame. |
85 spdy::SpdyFramer framer; | 87 spdy::SpdyFramer framer; |
86 return framer.CreateDataFrame( | 88 return framer.CreateDataFrame( |
87 stream_id, | 89 stream_id, |
88 data, | 90 data, |
89 len, | 91 len, |
90 fin ? spdy::DATA_FLAG_FIN : spdy::DATA_FLAG_NONE); | 92 fin ? spdy::DATA_FLAG_FIN : spdy::DATA_FLAG_NONE); |
91 } | 93 } |
92 | 94 |
| 95 } // namespace test_spdy2 |
| 96 |
93 } // namespace net | 97 } // namespace net |
OLD | NEW |