#ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_
#define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_
#include <stddef.h>
#include <stdint.h>
#include <map>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#include "base/containers/span.h"
#include "base/memory/raw_ptr.h"
#include "crypto/ec_private_key.h"
#include "net/base/completion_once_callback.h"
#include "net/base/host_mapping_rules.h"
#include "net/base/proxy_server.h"
#include "net/base/request_priority.h"
#include "net/base/test_completion_callback.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/dns/mock_host_resolver.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_network_session.h"
#include "net/http/http_response_info.h"
#include "net/http/http_server_properties.h"
#include "net/http/transport_security_state.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/quic/quic_crypto_client_stream_factory.h"
#include "net/socket/socket_test_util.h"
#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_session_pool.h"
#include "net/ssl/ssl_config_service_defaults.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(ENABLE_REPORTING)
#include "net/network_error_logging/network_error_logging_service.h"
#include "net/reporting/reporting_service.h"
#endif
class GURL;
namespace net {
class ClientSocketFactory;
class HashValue;
class HostPortPair;
class HostResolver;
class QuicContext;
class HttpUserAgentSettings;
class NetLogWithSource;
class SpdySessionKey;
class SpdyStream;
class SpdyStreamRequest;
class TransportSecurityState;
class URLRequestContextBuilder;
class ProxyDelegate;
const char kDefaultUrl[] = …;
const char kUploadData[] = …;
const int kUploadDataSize = …;
const uint32_t kMaxHeaderListSizeForTest = …;
std::unique_ptr<MockWrite[]> ChopWriteFrame(
const spdy::SpdySerializedFrame& frame,
int num_chunks);
void AppendToHeaderBlock(const char* const extra_headers[],
int extra_header_count,
quiche::HttpHeaderBlock* headers);
MockWrite CreateMockWrite(const spdy::SpdySerializedFrame& req);
MockWrite CreateMockWrite(const spdy::SpdySerializedFrame& req, int seq);
MockWrite CreateMockWrite(const spdy::SpdySerializedFrame& req,
int seq,
IoMode mode);
MockRead CreateMockRead(const spdy::SpdySerializedFrame& resp);
MockRead CreateMockRead(const spdy::SpdySerializedFrame& resp, int seq);
MockRead CreateMockRead(const spdy::SpdySerializedFrame& resp,
int seq,
IoMode mode);
spdy::SpdySerializedFrame CombineFrames(
std::vector<const spdy::SpdySerializedFrame*> frames);
bool GetSpdyPriority(const spdy::SpdySerializedFrame& frame,
spdy::SpdyPriority* priority);
base::WeakPtr<SpdyStream> CreateStreamSynchronously(
SpdyStreamType type,
const base::WeakPtr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
const NetLogWithSource& net_log,
bool detect_broken_connection = false,
base::TimeDelta heartbeat_interval = base::Seconds(0));
class StreamReleaserCallback : public TestCompletionCallbackBase { … };
struct SpdySessionDependencies { … };
std::unique_ptr<URLRequestContextBuilder>
CreateSpdyTestURLRequestContextBuilder(
ClientSocketFactory* client_socket_factory);
bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key);
base::WeakPtr<SpdySession> CreateSpdySession(HttpNetworkSession* http_session,
const SpdySessionKey& key,
const NetLogWithSource& net_log);
base::WeakPtr<SpdySession> CreateSpdySessionWithIpBasedPoolingDisabled(
HttpNetworkSession* http_session,
const SpdySessionKey& key,
const NetLogWithSource& net_log);
base::WeakPtr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool,
const SpdySessionKey& key);
class SpdySessionPoolPeer { … };
class SpdyTestUtil { … };
namespace test {
HashValue GetTestHashValue(uint8_t label);
}
}
#endif