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..14cf7adc5140465b8bbcbf6ed922f4b34a8451d4 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 WebSocketEndpointZeroUnlockDelay { |
tyoshino (SeeGerritForStatus)
2015/01/20 07:22:07
[optional] add a prefix "Scoped"?
Adam Rice
2015/01/20 07:33:54
Done.
|
+ public: |
+ WebSocketEndpointZeroUnlockDelay(); |
+ ~WebSocketEndpointZeroUnlockDelay(); |
+ |
+ private: |
+ base::TimeDelta old_delay_; |
+}; |
+ |
// Constants for a successful SOCKS v5 handshake. |
extern const char kSOCKS5GreetRequest[]; |
extern const int kSOCKS5GreetRequestLength; |