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

Unified Diff: net/spdy/spdy_websocket_test_util.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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_websocket_test_util.h ('k') | net/spdy/spdy_websocket_test_util_spdy2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_websocket_test_util.cc
===================================================================
--- net/spdy/spdy_websocket_test_util.cc (revision 124866)
+++ net/spdy/spdy_websocket_test_util.cc (working copy)
@@ -1,93 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/spdy/spdy_websocket_test_util.h"
-
-#include "net/spdy/spdy_framer.h"
-#include "net/spdy/spdy_http_utils.h"
-#include "net/spdy/spdy_test_util.h"
-
-static const int kDefaultAssociatedStreamId = 0;
-static const bool kDefaultCompressed = false;
-static const char* const kDefaultDataPointer = NULL;
-static const uint32 kDefaultDataLength = 0;
-static const char** const kDefaultExtraHeaders = NULL;
-static const int kDefaultExtraHeaderCount = 0;
-
-namespace net {
-
-spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeRequestFrame(
- const char* const headers[],
- int header_count,
- spdy::SpdyStreamId stream_id,
- RequestPriority request_priority) {
-
- // SPDY SYN_STREAM control frame header.
- const SpdyHeaderInfo kSynStreamHeader = {
- spdy::SYN_STREAM,
- stream_id,
- kDefaultAssociatedStreamId,
- ConvertRequestPriorityToSpdyPriority(request_priority),
- spdy::CONTROL_FLAG_NONE,
- kDefaultCompressed,
- spdy::INVALID,
- kDefaultDataPointer,
- kDefaultDataLength,
- spdy::DATA_FLAG_NONE
- };
-
- // Construct SPDY SYN_STREAM control frame.
- return ConstructSpdyPacket(
- kSynStreamHeader,
- kDefaultExtraHeaders,
- kDefaultExtraHeaderCount,
- headers,
- header_count);
-}
-
-spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeResponseFrame(
- const char* const headers[],
- int header_count,
- spdy::SpdyStreamId stream_id,
- RequestPriority request_priority) {
-
- // SPDY SYN_REPLY control frame header.
- const SpdyHeaderInfo kSynReplyHeader = {
- spdy::SYN_REPLY,
- stream_id,
- kDefaultAssociatedStreamId,
- ConvertRequestPriorityToSpdyPriority(request_priority),
- spdy::CONTROL_FLAG_NONE,
- kDefaultCompressed,
- spdy::INVALID,
- kDefaultDataPointer,
- kDefaultDataLength,
- spdy::DATA_FLAG_NONE
- };
-
- // Construct SPDY SYN_REPLY control frame.
- return ConstructSpdyPacket(
- kSynReplyHeader,
- kDefaultExtraHeaders,
- kDefaultExtraHeaderCount,
- headers,
- header_count);
-}
-
-spdy::SpdyFrame* ConstructSpdyWebSocketDataFrame(
- const char* data,
- int len,
- spdy::SpdyStreamId stream_id,
- bool fin) {
-
- // Construct SPDY data frame.
- spdy::SpdyFramer framer;
- return framer.CreateDataFrame(
- stream_id,
- data,
- len,
- fin ? spdy::DATA_FLAG_FIN : spdy::DATA_FLAG_NONE);
-}
-
-} // namespace net
« no previous file with comments | « net/spdy/spdy_websocket_test_util.h ('k') | net/spdy/spdy_websocket_test_util_spdy2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698