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

Unified Diff: net/websockets/websocket_test_util.h

Issue 869073002: Add WebSocket cookie tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/websockets/websocket_test_util.h
diff --git a/net/websockets/websocket_test_util.h b/net/websockets/websocket_test_util.h
index 5c7db80eac748fe676394e5b221cf39866bc38ff..2b6ce7787b858a200876837c5d94d289c4abdc6d 100644
--- a/net/websockets/websocket_test_util.h
+++ b/net/websockets/websocket_test_util.h
@@ -62,6 +62,16 @@ extern std::string WebSocketStandardRequest(const std::string& path,
const std::string& origin,
const std::string& extra_headers);
+// Generates a standard WebSocket handshake request. The challenge key used is
+// "dGhlIHNhbXBsZSBub25jZQ==". |cookies| must be empty or terminated with
+// "\r\n". Each header in |extra_headers| must be terminated with "\r\n".
+extern std::string WebSocketStandardRequestWithCookies(
Ryan Sleevi 2015/02/02 20:14:43 Why are these all flagged extern?
yhirano 2015/02/09 10:50:16 Done.
+ const std::string& path,
+ const std::string& host,
+ const std::string& origin,
+ const std::string& cookies,
+ const std::string& extra_headers);
+
// A response with the appropriate accept header to match the above challenge
// key. Each header in |extra_headers| must be terminated with "\r\n".
extern std::string WebSocketStandardResponse(const std::string& extra_headers);

Powered by Google App Engine
This is Rietveld 408576698