#ifndef NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_
#define NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_
#include <stdint.h>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/functional/callback.h"
#include "base/memory/scoped_refptr.h"
#include "net/http/http_basic_state.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_stream_parser.h"
#include "net/socket/client_socket_handle.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_test_util.h"
#include "net/websockets/websocket_event_interface.h"
#include "net/websockets/websocket_handshake_stream_create_helper.h"
#include "net/websockets/websocket_stream.h"
namespace url {
class Origin;
}
namespace net {
class AuthChallengeInfo;
class AuthCredentials;
class HttpResponseHeaders;
class IPEndPoint;
class MockClientSocketFactory;
class SSLInfo;
class SequencedSocketData;
class URLRequest;
class URLRequestContextBuilder;
class WebSocketBasicHandshakeStream;
class WebSocketHttp2HandshakeStream;
class WebSocketHttp3HandshakeStream;
struct SSLSocketDataProvider;
struct WebSocketHandshakeRequestInfo;
struct WebSocketHandshakeResponseInfo;
WebSocketExtraHeaders;
class LinearCongruentialGenerator { … };
std::string WebSocketExtraHeadersToString(const WebSocketExtraHeaders& headers);
HttpRequestHeaders WebSocketExtraHeadersToHttpRequestHeaders(
const WebSocketExtraHeaders& headers);
std::string WebSocketStandardRequest(
const std::string& path,
const std::string& host,
const url::Origin& origin,
const WebSocketExtraHeaders& send_additional_request_headers,
const WebSocketExtraHeaders& extra_headers);
std::string WebSocketStandardRequestWithCookies(
const std::string& path,
const std::string& host,
const url::Origin& origin,
const WebSocketExtraHeaders& cookies,
const WebSocketExtraHeaders& send_additional_request_headers,
const WebSocketExtraHeaders& extra_headers);
std::string WebSocketStandardResponse(const std::string& extra_headers);
HttpRequestHeaders WebSocketCommonTestHeaders();
quiche::HttpHeaderBlock WebSocketHttp2Request(
const std::string& path,
const std::string& authority,
const std::string& origin,
const WebSocketExtraHeaders& extra_headers);
quiche::HttpHeaderBlock WebSocketHttp2Response(
const WebSocketExtraHeaders& extra_headers);
class WebSocketMockClientSocketFactoryMaker { … };
struct WebSocketTestURLRequestContextHost { … };
class DummyConnectDelegate : public WebSocketStream::ConnectDelegate { … };
class TestWebSocketStreamRequestAPI : public WebSocketStreamRequestAPI { … };
class TestWebSocketHandshakeStreamCreateHelper
: public WebSocketHandshakeStreamCreateHelper { … };
}
#endif