Index: net/http/http_stream_factory_impl_unittest.cc |
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc |
index f2185a9512833cf8a2af8d295d18059f52b59583..2813bbebc524a8b1e326743c634b1b032b917600 100644 |
--- a/net/http/http_stream_factory_impl_unittest.cc |
+++ b/net/http/http_stream_factory_impl_unittest.cc |
@@ -21,6 +21,7 @@ |
#include "net/http/http_server_properties.h" |
#include "net/http/http_server_properties_impl.h" |
#include "net/http/http_stream.h" |
+#include "net/http/http_stream_factory_test_util.h" |
#include "net/http/transport_security_state.h" |
#include "net/proxy/proxy_info.h" |
#include "net/proxy/proxy_service.h" |
@@ -125,36 +126,6 @@ class MockWebSocketHandshakeStream : public WebSocketHandshakeStreamBase { |
const StreamType type_; |
}; |
-// HttpStreamFactoryImpl subclass that can wait until a preconnect is complete. |
-class MockHttpStreamFactoryImplForPreconnect : public HttpStreamFactoryImpl { |
- public: |
- MockHttpStreamFactoryImplForPreconnect(HttpNetworkSession* session, |
- bool for_websockets) |
- : HttpStreamFactoryImpl(session, for_websockets), |
- preconnect_done_(false), |
- waiting_for_preconnect_(false) {} |
- |
- |
- void WaitForPreconnects() { |
- while (!preconnect_done_) { |
- waiting_for_preconnect_ = true; |
- base::MessageLoop::current()->Run(); |
- waiting_for_preconnect_ = false; |
- } |
- } |
- |
- private: |
- // HttpStreamFactoryImpl methods. |
- virtual void OnPreconnectsCompleteInternal() OVERRIDE { |
- preconnect_done_ = true; |
- if (waiting_for_preconnect_) |
- base::MessageLoop::current()->Quit(); |
- } |
- |
- bool preconnect_done_; |
- bool waiting_for_preconnect_; |
-}; |
- |
class StreamRequestWaiter : public HttpStreamRequest::Delegate { |
public: |
StreamRequestWaiter() |