chromium/services/network/trust_tokens/trust_token_request_helper_factory_unittest.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/network/trust_tokens/trust_token_request_helper_factory.h"

#include <optional>
#include <string_view>

#include "base/no_destructor.h"
#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "net/base/isolation_info.h"
#include "net/url_request/url_request.h"
#include "services/network/public/cpp/optional_trust_token_params.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/trust_token_http_headers.h"
#include "services/network/public/cpp/trust_token_parameterization.h"
#include "services/network/public/mojom/trust_tokens.mojom.h"
#include "services/network/test/trust_token_test_util.h"
#include "services/network/trust_tokens/pending_trust_token_store.h"
#include "services/network/trust_tokens/trust_token_parameterization.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/origin.h"

namespace network {

namespace {

Outcome;

// These origins are not suitable for keying persistent Trust Tokens state:
// - UnsuitableUntrustworthyOrigin is not potentially trustworthy.
// - UnsuitableNonHttpNonHttpsOrigin is neither HTTP nor HTTPS.
const url::Origin& UnsuitableUntrustworthyOrigin() {}

const url::Origin& UnsuitableNonHttpNonHttpsOrigin() {}

// Creates an IsolationInfo for the given top frame origin. (We co-opt
// CreateForInternalRequest for this purpose, but define an alias because we're
// not actually creating internal requests.)
auto CreateIsolationInfo =;

}  // namespace

class TrustTokenRequestHelperFactoryTest : public ::testing::Test {};

TEST_F(TrustTokenRequestHelperFactoryTest, MissingTopFrameOrigin) {}

TEST_F(TrustTokenRequestHelperFactoryTest, UnsuitableTopFrameOrigin) {}

TEST_F(TrustTokenRequestHelperFactoryTest, ForbiddenHeaders) {}

TEST_F(TrustTokenRequestHelperFactoryTest,
       CreatingSigningHelperRequiresSuitableIssuers) {}

TEST_F(TrustTokenRequestHelperFactoryTest,
       WillCreateSigningHelperWithAdditionalData) {}

TEST_F(TrustTokenRequestHelperFactoryTest, CreatesSigningHelper) {}

TEST_F(TrustTokenRequestHelperFactoryTest, CreatesIssuanceHelper) {}

TEST_F(TrustTokenRequestHelperFactoryTest, CreatesRedemptionHelper) {}

TEST_F(TrustTokenRequestHelperFactoryTest, RespectsAuthorizer) {}
}  // namespace network