#include "content/test/fake_network.h"
#include "base/containers/span.h"
#include "base/feature_list.h"
#include "base/no_destructor.h"
#include "base/strings/string_util.h"
#include "net/http/http_util.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/parsed_headers.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
namespace content {
namespace {
const char kDefaultHttpHeader[] = …;
const char kDefaultHttpBody[] = …;
const char kDefaultHttpHeaderForJS[] = …;
const char kDefaultHttpBodyForJS[] = …;
}
struct FakeNetwork::ResponseInfo { … };
FakeNetwork::FakeNetwork() = default;
FakeNetwork::~FakeNetwork() = default;
const FakeNetwork::ResponseInfo& FakeNetwork::FindResponseInfo(
const GURL& url) const { … }
void FakeNetwork::SetDefaultResponse(const std::string& headers,
const std::string& body,
bool network_accessed,
net::Error error_code) { … }
void FakeNetwork::SetResponse(const GURL& url,
const std::string& headers,
const std::string& body,
bool network_accessed,
net::Error error_code) { … }
bool FakeNetwork::HandleRequest(URLLoaderInterceptor::RequestParams* params) { … }
}