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

Unified Diff: net/websockets/websocket_test_util.h

Issue 565573002: Implement handshake timeout on WebSocket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/websockets/websocket_stream_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_test_util.h
diff --git a/net/websockets/websocket_test_util.h b/net/websockets/websocket_test_util.h
index e95db1a4040b90e972d15c24e2335b8f00548baa..803c9be0af4a32cb1936cdb748ea3ee237f5e4d3 100644
--- a/net/websockets/websocket_test_util.h
+++ b/net/websockets/websocket_test_util.h
@@ -14,6 +14,10 @@
class GURL;
+namespace base {
+class Timer;
+} // namespace base
+
namespace url {
class Origin;
} // namespace url
@@ -37,8 +41,9 @@ class LinearCongruentialGenerator {
};
// Alternate version of WebSocketStream::CreateAndConnectStream() for testing
-// use only. The difference is the use of a |create_helper| argument in place of
-// |requested_subprotocols|. Implemented in websocket_stream.cc.
+// use only. The differences are the use of a |create_helper| argument in place
+// of |requested_subprotocols| and taking |timer| as the handshake timeout
+// timer. Implemented in websocket_stream.cc.
NET_EXPORT_PRIVATE extern scoped_ptr<WebSocketStreamRequest>
CreateAndConnectStreamForTesting(
const GURL& socket_url,
@@ -46,7 +51,8 @@ NET_EXPORT_PRIVATE extern scoped_ptr<WebSocketStreamRequest>
const url::Origin& origin,
URLRequestContext* url_request_context,
const BoundNetLog& net_log,
- scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate);
+ scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate,
+ scoped_ptr<base::Timer> timer);
// Generates a standard WebSocket handshake request. The challenge key used is
// "dGhlIHNhbXBsZSBub25jZQ==". Each header in |extra_headers| must be terminated
« no previous file with comments | « net/websockets/websocket_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698