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

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

Issue 17028007: Merge the HttpNetworkTransaction tests and parametrize them on a NextProto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/net.gyp ('k') | net/spdy/spdy_test_util_common.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_COMMON_H_ 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_
6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "crypto/ec_private_key.h" 10 #include "crypto/ec_private_key.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 class SpdyTestUtil { 250 class SpdyTestUtil {
251 public: 251 public:
252 explicit SpdyTestUtil(NextProto protocol); 252 explicit SpdyTestUtil(NextProto protocol);
253 253
254 // Add the appropriate headers to put |url| into |block|. 254 // Add the appropriate headers to put |url| into |block|.
255 void AddUrlToHeaderBlock(base::StringPiece url, 255 void AddUrlToHeaderBlock(base::StringPiece url,
256 SpdyHeaderBlock* headers) const; 256 SpdyHeaderBlock* headers) const;
257 257
258 scoped_ptr<SpdyHeaderBlock> ConstructGetHeaderBlock( 258 scoped_ptr<SpdyHeaderBlock> ConstructGetHeaderBlock(
259 base::StringPiece url) const; 259 base::StringPiece url) const;
260 scoped_ptr<SpdyHeaderBlock> ConstructGetHeaderBlockForProxy(
261 base::StringPiece url) const;
260 scoped_ptr<SpdyHeaderBlock> ConstructPostHeaderBlock( 262 scoped_ptr<SpdyHeaderBlock> ConstructPostHeaderBlock(
261 base::StringPiece url, 263 base::StringPiece url,
262 int64 content_length) const; 264 int64 content_length) const;
263 265
264 // Construct a SPDY frame. If it is a SYN_STREAM or SYN_REPLY frame (as 266 // Construct a SPDY frame. If it is a SYN_STREAM or SYN_REPLY frame (as
265 // specified in header_info.kind), the provided headers are included in the 267 // specified in header_info.kind), the provided headers are included in the
266 // frame. 268 // frame.
267 SpdyFrame* ConstructSpdyFrame( 269 SpdyFrame* ConstructSpdyFrame(
268 const SpdyHeaderInfo& header_info, 270 const SpdyHeaderInfo& header_info,
269 scoped_ptr<SpdyHeaderBlock> headers) const; 271 scoped_ptr<SpdyHeaderBlock> headers) const;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // Constructs a standard SPDY GET SYN frame, optionally compressed 347 // Constructs a standard SPDY GET SYN frame, optionally compressed
346 // for the url |url|. 348 // for the url |url|.
347 // |extra_headers| are the extra header-value pairs, which typically 349 // |extra_headers| are the extra header-value pairs, which typically
348 // will vary the most between calls. 350 // will vary the most between calls.
349 // Returns a SpdyFrame. 351 // Returns a SpdyFrame.
350 SpdyFrame* ConstructSpdyGet(const char* const url, 352 SpdyFrame* ConstructSpdyGet(const char* const url,
351 bool compressed, 353 bool compressed,
352 SpdyStreamId stream_id, 354 SpdyStreamId stream_id,
353 RequestPriority request_priority) const; 355 RequestPriority request_priority) const;
354 356
357 SpdyFrame* ConstructSpdyGetForProxy(const char* const url,
358 bool compressed,
359 SpdyStreamId stream_id,
360 RequestPriority request_priority) const;
361
355 // Constructs a standard SPDY GET SYN frame, optionally compressed. 362 // Constructs a standard SPDY GET SYN frame, optionally compressed.
356 // |extra_headers| are the extra header-value pairs, which typically 363 // |extra_headers| are the extra header-value pairs, which typically
357 // will vary the most between calls. If |direct| is false, the 364 // will vary the most between calls. If |direct| is false, the
358 // the full url will be used instead of simply the path. 365 // the full url will be used instead of simply the path.
359 // Returns a SpdyFrame. 366 // Returns a SpdyFrame.
360 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], 367 SpdyFrame* ConstructSpdyGet(const char* const extra_headers[],
361 int extra_header_count, 368 int extra_header_count,
362 bool compressed, 369 bool compressed,
363 int stream_id, 370 int stream_id,
364 RequestPriority request_priority, 371 RequestPriority request_priority,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 const char* GetPathKey() const; 479 const char* GetPathKey() const;
473 480
474 private: 481 private:
475 const NextProto protocol_; 482 const NextProto protocol_;
476 const SpdyMajorVersion spdy_version_; 483 const SpdyMajorVersion spdy_version_;
477 }; 484 };
478 485
479 } // namespace net 486 } // namespace net
480 487
481 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ 488 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698