chromium/content/browser/interest_group/subresource_url_authorizations_unittest.cc

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

#include "content/browser/interest_group/subresource_url_authorizations.h"

#include <tuple>

#include "content/browser/interest_group/auction_worklet_manager.h"
#include "content/browser/interest_group/subresource_url_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/interest_group/auction_config.h"
#include "url/gurl.h"

namespace content {

namespace {

WorkletHandle;
BundleSubresourceInfo;

// We don't need to actually make real WorkletHandles --
// SubresourceUrlAuthorizations only cares about the addresses of
// WorkletHandles, so we can use hard-coded pointers.
const WorkletHandle* const kWorkletHandle1 =;

const WorkletHandle* const kWorkletHandle2 =;

constexpr char kBundleUrl[] =;

constexpr char kSubresourceUrl1[] =;
constexpr char kSubresourceUrl2[] =;

// NOTE: MakeBlinkSubresource() does *not* yield the same results each
// time it is called, since it generates a random token in the
// DirectFromSellerSignalsSubresource constructor.

blink::DirectFromSellerSignalsSubresource MakeBlinkSubresource() {}

}  // namespace

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

TEST_F(SubresourceUrlAuthorizationsTest, Construct) {}

TEST_F(SubresourceUrlAuthorizationsTest, InitiallyNotAuthorized) {}

TEST_F(SubresourceUrlAuthorizationsTest, Simple) {}

TEST_F(SubresourceUrlAuthorizationsTest, NotAuthorized) {}

TEST_F(SubresourceUrlAuthorizationsTest, MultipleHandles) {}

TEST_F(SubresourceUrlAuthorizationsTest, BadScriptAltersSubresource) {}

}  // namespace content