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

Unified Diff: net/spdy/spdy_websocket_test_util.h

Issue 17570014: [SPDY] Unfork websocket_handshake_handler_spdy{2,3}_unittest.cc (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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_websocket_test_util.h
diff --git a/net/spdy/spdy_websocket_test_util.h b/net/spdy/spdy_websocket_test_util.h
index f3349193672a74e4cc3d10b2c4f7e7ec4299d38e..7a9a59e96e8c5ae9c34d3d69b86b934f13deeb9f 100644
--- a/net/spdy/spdy_websocket_test_util.h
+++ b/net/spdy/spdy_websocket_test_util.h
@@ -6,6 +6,7 @@
#define NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_
#include "net/base/request_priority.h"
+#include "net/spdy/spdy_header_block.h"
#include "net/spdy/spdy_protocol.h"
#include "net/spdy/spdy_test_util_common.h"
@@ -15,8 +16,13 @@ class SpdyWebSocketTestUtil {
public:
explicit SpdyWebSocketTestUtil(NextProto protocol);
- // Adds the given key/value pair to |headers|, tweaking it depending
- // on SPDY version.
+ // Returns the value corresponding to the given key (passed through
+ // GetHeaderKey()), or the empty string if none exists.
+ std::string GetHeader(const SpdyHeaderBlock& headers,
+ const std::string& key) const;
+
+ // Adds the given key/value pair to |headers|, passing the key
+ // through GetHeaderKey().
void SetHeader(const std::string& key,
const std::string& value,
SpdyHeaderBlock* headers) const;
@@ -57,8 +63,12 @@ class SpdyWebSocketTestUtil {
// Forwards to |spdy_util_|.
SpdyFrame* ConstructSpdySettings(const SettingsMap& settings) const;
+ SpdyMajorVersion spdy_version() const;
private:
+ // Modify the header key based on the SPDY version and return it.
+ std::string GetHeaderKey(const std::string& key) const;
+
SpdyTestUtil spdy_util_;
};

Powered by Google App Engine
This is Rietveld 408576698