Index: net/socket/socket_test_util.h |
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h |
index 7b45c0c1f5aa074769da8ee14639bd3a368b8b19..c3d9f8d8b8361a7966c9eeff1a3ffe8a37806f7d 100644 |
--- a/net/socket/socket_test_util.h |
+++ b/net/socket/socket_test_util.h |
@@ -18,6 +18,7 @@ |
#include "base/memory/scoped_vector.h" |
#include "base/memory/weak_ptr.h" |
#include "base/strings/string16.h" |
+#include "base/time/time.h" |
#include "net/base/address_list.h" |
#include "net/base/io_buffer.h" |
#include "net/base/net_errors.h" |
@@ -1318,6 +1319,18 @@ class MockSOCKSClientSocketPool : public SOCKSClientSocketPool { |
DISALLOW_COPY_AND_ASSIGN(MockSOCKSClientSocketPool); |
}; |
+// Convenience class to temporarily set the WebSocketEndpointLockManager unlock |
+// delay to zero for testing purposes. Automatically restores the original value |
+// when destroyed. |
+class ScopedWebSocketEndpointZeroUnlockDelay { |
+ public: |
+ ScopedWebSocketEndpointZeroUnlockDelay(); |
+ ~ScopedWebSocketEndpointZeroUnlockDelay(); |
+ |
+ private: |
+ base::TimeDelta old_delay_; |
+}; |
+ |
// Constants for a successful SOCKS v5 handshake. |
extern const char kSOCKS5GreetRequest[]; |
extern const int kSOCKS5GreetRequestLength; |