#include "net/websockets/websocket_stream_create_test_base.h"
#include <stddef.h>
#include <utility>
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/timer/timer.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "net/log/net_log_with_source.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/websockets/websocket_handshake_request_info.h"
#include "net/websockets/websocket_handshake_response_info.h"
#include "net/websockets/websocket_stream.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace url {
class Origin;
}
namespace net {
class IPEndPoint;
class SiteForCookies;
HeaderKeyValuePair;
class WebSocketStreamCreateTestBase::TestConnectDelegate
: public WebSocketStream::ConnectDelegate { … };
WebSocketStreamCreateTestBase::WebSocketStreamCreateTestBase() = default;
WebSocketStreamCreateTestBase::~WebSocketStreamCreateTestBase() = default;
void WebSocketStreamCreateTestBase::CreateAndConnectStream(
const GURL& socket_url,
const std::vector<std::string>& sub_protocols,
const url::Origin& origin,
const SiteForCookies& site_for_cookies,
StorageAccessApiStatus storage_access_api_status,
const IsolationInfo& isolation_info,
const HttpRequestHeaders& additional_headers,
std::unique_ptr<base::OneShotTimer> timer) { … }
std::vector<HeaderKeyValuePair>
WebSocketStreamCreateTestBase::RequestHeadersToVector(
const HttpRequestHeaders& headers) { … }
std::vector<HeaderKeyValuePair>
WebSocketStreamCreateTestBase::ResponseHeadersToVector(
const HttpResponseHeaders& headers) { … }
void WebSocketStreamCreateTestBase::WaitUntilConnectDone() { … }
void WebSocketStreamCreateTestBase::WaitUntilOnAuthRequired() { … }
std::vector<std::string> WebSocketStreamCreateTestBase::NoSubProtocols() { … }
}