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
3 // found in the LICENSE file.
5 #ifndef NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_
6 #define NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_
8 #include "net/base/request_priority.h"
9 #include "net/spdy/spdy_protocol.h"
13 namespace test_spdy2
{
15 // Constructs a standard SPDY SYN_STREAM frame for WebSocket over SPDY opening
17 SpdyFrame
* ConstructSpdyWebSocketSynStream(int stream_id
,
22 // Constructs a standard SPDY SYN_REPLY packet to match the WebSocket over SPDY
24 SpdyFrame
* ConstructSpdyWebSocketSynReply(int stream_id
);
26 // Constructs a WebSocket over SPDY handshake request packet.
27 SpdyFrame
* ConstructSpdyWebSocketHandshakeRequestFrame(
28 const char* const headers
[],
30 SpdyStreamId stream_id
,
31 RequestPriority request_priority
);
33 // Constructs a WebSocket over SPDY handshake response packet.
34 SpdyFrame
* ConstructSpdyWebSocketHandshakeResponseFrame(
35 const char* const headers
[],
37 SpdyStreamId stream_id
,
38 RequestPriority request_priority
);
40 // Constructs a SPDY HEADERS frame for a WebSocket frame over SPDY.
41 SpdyFrame
* ConstructSpdyWebSocketHeadersFrame(int stream_id
,
45 // Constructs a WebSocket over SPDY data packet.
46 SpdyFrame
* ConstructSpdyWebSocketDataFrame(const char* data
,
48 SpdyStreamId stream_id
,
51 } // namespace test_spdy2
55 #endif // NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_