#include "services/network/test/trust_token_test_util.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/values.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
namespace network {
TestURLRequestMaker::TestURLRequestMaker() { … }
TestURLRequestMaker::~TestURLRequestMaker() = default;
std::unique_ptr<net::URLRequest> TestURLRequestMaker::MakeURLRequest(
std::string_view spec) { … }
TrustTokenRequestHelperTest::TrustTokenRequestHelperTest(
base::test::TaskEnvironment::TimeSource time_source)
: … { … }
TrustTokenRequestHelperTest::~TrustTokenRequestHelperTest() = default;
mojom::TrustTokenOperationStatus
TrustTokenRequestHelperTest::ExecuteBeginOperationAndWaitForResult(
TrustTokenRequestHelper* helper,
net::URLRequest* request) { … }
mojom::TrustTokenOperationStatus
TrustTokenRequestHelperTest::ExecuteFinalizeAndWaitForResult(
TrustTokenRequestHelper* helper,
mojom::URLResponseHead* response) { … }
std::string TrustTokenEnumToString(mojom::TrustTokenOperationType operation) { … }
std::string TrustTokenEnumToString(mojom::TrustTokenRefreshPolicy policy) { … }
std::string TrustTokenEnumToString(
mojom::TrustTokenSignRequestData sign_request_data) { … }
TrustTokenParametersAndSerialization::TrustTokenParametersAndSerialization(
mojom::TrustTokenParamsPtr params,
std::string serialized_params)
: … { … }
TrustTokenParametersAndSerialization::~TrustTokenParametersAndSerialization() =
default;
TrustTokenParametersAndSerialization::TrustTokenParametersAndSerialization(
TrustTokenParametersAndSerialization&&) = default;
TrustTokenParametersAndSerialization&
TrustTokenParametersAndSerialization::operator=(
TrustTokenParametersAndSerialization&&) = default;
TrustTokenTestParameters::~TrustTokenTestParameters() = default;
TrustTokenTestParameters::TrustTokenTestParameters(
const TrustTokenTestParameters&) = default;
TrustTokenTestParameters& TrustTokenTestParameters::operator=(
const TrustTokenTestParameters&) = default;
TrustTokenTestParameters::TrustTokenTestParameters(
int version,
network::mojom::TrustTokenOperationType operation,
std::optional<network::mojom::TrustTokenRefreshPolicy> refresh_policy,
std::optional<std::vector<std::string>> issuer_specs)
: … { … }
TrustTokenParametersAndSerialization
SerializeTrustTokenParametersAndConstructExpectation(
const TrustTokenTestParameters& input) { … }
std::string WrapKeyCommitmentsForIssuers(
base::flat_map<url::Origin, std::string_view> issuers_and_commitments) { … }
}