Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: net/spdy/spdy_test_util.h

Issue 1755005: SPDY: Fix Alternate-Protocol. (Closed)
Patch Set: Address mbelshe's comments. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_
6 #define NET_SPDY_SPDY_TEST_UTIL_H_
7
8 #include "base/basictypes.h"
9
10 namespace net {
11
12 const uint8 kGetSyn[] = {
13 0x80, 0x01, 0x00, 0x01, // header
14 0x01, 0x00, 0x00, 0x49, // FIN, len
15 0x00, 0x00, 0x00, 0x01, // stream id
16 0x00, 0x00, 0x00, 0x00, // associated
17 0xc0, 0x00, 0x00, 0x03, // 3 headers
18 0x00, 0x06, 'm', 'e', 't', 'h', 'o', 'd',
19 0x00, 0x03, 'G', 'E', 'T',
20 0x00, 0x03, 'u', 'r', 'l',
21 0x00, 0x16, 'h', 't', 't', 'p', ':', '/', '/', 'w', 'w', 'w',
22 '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o',
23 'm', '/',
24 0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n',
25 0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1',
26 };
27
28 const uint8 kGetSynReply[] = {
29 0x80, 0x01, 0x00, 0x02, // header
30 0x00, 0x00, 0x00, 0x45,
31 0x00, 0x00, 0x00, 0x01,
32 0x00, 0x00, 0x00, 0x04, // 4 headers
33 0x00, 0x05, 'h', 'e', 'l', 'l', 'o', // "hello"
34 0x00, 0x03, 'b', 'y', 'e', // "bye"
35 0x00, 0x06, 's', 't', 'a', 't', 'u', 's', // "status"
36 0x00, 0x03, '2', '0', '0', // "200"
37 0x00, 0x03, 'u', 'r', 'l', // "url"
38 0x00, 0x0a, '/', 'i', 'n', 'd', 'e', 'x', '.', 'p', 'h', 'p', // "/index...
39 0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n', // "version"
40 0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1', // "HTTP/1.1"
41 };
42
43 const uint8 kGetBodyFrame[] = {
44 0x00, 0x00, 0x00, 0x01, // header
45 0x01, 0x00, 0x00, 0x06, // FIN, length
46 'h', 'e', 'l', 'l', 'o', '!', // "hello"
47 };
48
49 const uint8 kGetSynCompressed[] = {
50 0x80, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x47,
51 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
52 0xc0, 0x00, 0x38, 0xea, 0xdf, 0xa2, 0x51, 0xb2,
53 0x62, 0x60, 0x66, 0x60, 0xcb, 0x05, 0xe6, 0xc3,
54 0xfc, 0x14, 0x06, 0x66, 0x77, 0xd7, 0x10, 0x06,
55 0x66, 0x90, 0xa0, 0x58, 0x46, 0x49, 0x49, 0x81,
56 0x95, 0xbe, 0x3e, 0x30, 0xe2, 0xf5, 0xd2, 0xf3,
57 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x92, 0xf3, 0x73,
58 0xf5, 0x19, 0xd8, 0xa1, 0x1a, 0x19, 0x38, 0x60,
59 0xe6, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff
60 };
61
62 const uint8 kPostSyn[] = {
63 0x80, 0x01, 0x00, 0x01, // header
64 0x00, 0x00, 0x00, 0x4a, // flags, len
65 0x00, 0x00, 0x00, 0x01, // stream id
66 0x00, 0x00, 0x00, 0x00, // associated
67 0xc0, 0x00, 0x00, 0x03, // 4 headers
68 0x00, 0x06, 'm', 'e', 't', 'h', 'o', 'd',
69 0x00, 0x04, 'P', 'O', 'S', 'T',
70 0x00, 0x03, 'u', 'r', 'l',
71 0x00, 0x16, 'h', 't', 't', 'p', ':', '/', '/', 'w', 'w', 'w',
72 '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o',
73 'm', '/',
74 0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n',
75 0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1',
76 };
77
78 const uint8 kPostUploadFrame[] = {
79 0x00, 0x00, 0x00, 0x01, // header
80 0x01, 0x00, 0x00, 0x0c, // FIN flag
81 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\0'
82 };
83
84 // The response
85 const uint8 kPostSynReply[] = {
86 0x80, 0x01, 0x00, 0x02, // header
87 0x00, 0x00, 0x00, 0x45,
88 0x00, 0x00, 0x00, 0x01,
89 0x00, 0x00, 0x00, 0x04, // 4 headers
90 0x00, 0x05, 'h', 'e', 'l', 'l', 'o', // "hello"
91 0x00, 0x03, 'b', 'y', 'e', // "bye"
92 0x00, 0x06, 's', 't', 'a', 't', 'u', 's', // "status"
93 0x00, 0x03, '2', '0', '0', // "200"
94 0x00, 0x03, 'u', 'r', 'l', // "url"
95 // "/index.php"
96 0x00, 0x0a, '/', 'i', 'n', 'd', 'e', 'x', '.', 'p', 'h', 'p',
97 0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n', // "version"
98 0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1', // "HTTP/1.1"
99 };
100
101 const uint8 kPostBodyFrame[] = {
102 0x00, 0x00, 0x00, 0x01, // header
103 0x01, 0x00, 0x00, 0x06, // FIN, length
104 'h', 'e', 'l', 'l', 'o', '!', // "hello"
105 };
106
107 const uint8 kGoAway[] = {
108 0x80, 0x01, 0x00, 0x07, // header
109 0x00, 0x00, 0x00, 0x04, // flags, len
110 0x00, 0x00, 0x00, 0x00, // last-accepted-stream-id
111 };
112
113 } // namespace net
114
115 #endif // NET_SPDY_SPDY_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698