Chromium Code Reviews| Index: net/websockets/websocket_test_util.cc |
| diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc |
| index 6091c9e0be16a1a95d48e2c7cb7ba5f37b41eda7..5acfa25b474abfdd8cca264ed5de85eac8d0af0d 100644 |
| --- a/net/websockets/websocket_test_util.cc |
| +++ b/net/websockets/websocket_test_util.cc |
| @@ -36,6 +36,16 @@ std::string WebSocketStandardRequest(const std::string& path, |
| const std::string& host, |
| const std::string& origin, |
| const std::string& extra_headers) { |
| + return WebSocketStandardRequestWithCookies(path, host, origin, "", |
|
Ryan Sleevi
2015/02/02 20:14:43
s/""/std::string()/
yhirano
2015/02/09 10:50:16
Done.
|
| + extra_headers); |
| +} |
| + |
| +std::string WebSocketStandardRequestWithCookies( |
| + const std::string& path, |
| + const std::string& host, |
| + const std::string& origin, |
| + const std::string& cookies, |
| + const std::string& extra_headers) { |
| // Unrelated changes in net/http may change the order and default-values of |
| // HTTP headers, causing WebSocket tests to fail. It is safe to update this |
| // string in that case. |
| @@ -51,10 +61,12 @@ std::string WebSocketStandardRequest(const std::string& path, |
| "User-Agent:\r\n" |
| "Accept-Encoding: gzip, deflate\r\n" |
| "Accept-Language: en-us,fr\r\n" |
| + "%s" |
| "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n" |
| "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n" |
| "%s\r\n", |
| - path.c_str(), host.c_str(), origin.c_str(), extra_headers.c_str()); |
| + path.c_str(), host.c_str(), origin.c_str(), cookies.c_str(), |
| + extra_headers.c_str()); |
| } |
| std::string WebSocketStandardResponse(const std::string& extra_headers) { |