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

Side by Side Diff: net/spdy/spdy_test_util_spdy2.cc

Issue 9582034: Fork SPDY/2 and SPDY/3 versions of our SPDY tests, in preparation for landing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge bug Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_test_util_spdy2.h ('k') | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 5 #include "net/spdy/spdy_test_util_spdy2.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"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "net/http/http_network_session.h" 13 #include "net/http/http_network_session.h"
14 #include "net/http/http_network_transaction.h" 14 #include "net/http/http_network_transaction.h"
15 #include "net/http/http_server_properties_impl.h" 15 #include "net/http/http_server_properties_impl.h"
16 #include "net/spdy/spdy_framer.h" 16 #include "net/spdy/spdy_framer.h"
17 #include "net/spdy/spdy_http_utils.h" 17 #include "net/spdy/spdy_http_utils.h"
18 18
19 namespace net { 19 namespace net {
20 namespace test_spdy2 {
20 21
21 // Chop a frame into an array of MockWrites. 22 // Chop a frame into an array of MockWrites.
22 // |data| is the frame to chop. 23 // |data| is the frame to chop.
23 // |length| is the length of the frame to chop. 24 // |length| is the length of the frame to chop.
24 // |num_chunks| is the number of chunks to create. 25 // |num_chunks| is the number of chunks to create.
25 MockWrite* ChopWriteFrame(const char* data, int length, int num_chunks) { 26 MockWrite* ChopWriteFrame(const char* data, int length, int num_chunks) {
26 MockWrite* chunks = new MockWrite[num_chunks]; 27 MockWrite* chunks = new MockWrite[num_chunks];
27 int chunk_size = length / num_chunks; 28 int chunk_size = length / num_chunks;
28 for (int index = 0; index < num_chunks; index++) { 29 for (int index = 0; index < num_chunks; index++) {
29 const char* ptr = data + (index * chunk_size); 30 const char* ptr = data + (index * chunk_size);
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 2, // Priority 998 2, // Priority
998 spdy::CONTROL_FLAG_FIN, // Control Flags 999 spdy::CONTROL_FLAG_FIN, // Control Flags
999 false, // Compressed 1000 false, // Compressed
1000 spdy::INVALID, // Status 1001 spdy::INVALID, // Status
1001 NULL, // Data 1002 NULL, // Data
1002 0, // Length 1003 0, // Length
1003 spdy::DATA_FLAG_NONE // Data Flags 1004 spdy::DATA_FLAG_NONE // Data Flags
1004 }; 1005 };
1005 return kHeader; 1006 return kHeader;
1006 } 1007 }
1008
1009 } // namespace test_spdy2
1007 } // namespace net 1010 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_spdy2.h ('k') | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698