chromium/content/browser/interest_group/interest_group_caching_storage_unittest.cc

// Copyright 2023 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/interest_group_caching_storage.h"

#include <cstddef>
#include <optional>

#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback_helpers.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "content/browser/interest_group/interest_group_features.h"
#include "content/browser/interest_group/interest_group_update.h"
#include "content/common/features.h"
#include "content/public/common/content_features.h"
#include "net/test/embedded_test_server/request_handler_util.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/interest_group/interest_group.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "url/origin.h"

namespace content {

constexpr char kAdURL[] =;
constexpr char kBiddingURL[] =;
constexpr char kUpdateURL[] =;
constexpr char kJoiningURL[] =;
blink::InterestGroup MakeInterestGroup(url::Origin owner, std::string name) {}

class InterestGroupCachingStorageTest : public testing::Test {};

TEST_F(InterestGroupCachingStorageTest, DBUpdatesShouldModifyCache) {}

TEST_F(InterestGroupCachingStorageTest, GettersShouldNotModifyCache) {}

TEST_F(InterestGroupCachingStorageTest, GetInterestGroupUsesCache) {}

TEST_F(InterestGroupCachingStorageTest, CacheWorksWhenPointerReleased) {}

TEST_F(InterestGroupCachingStorageTest,
       CacheCollatesCallsToGetInterestGroupsByOwner) {}

TEST_F(InterestGroupCachingStorageTest,
       CacheDoesNotCollateCallsIfInvalidatedSinceOutstandingCall) {}

TEST_F(InterestGroupCachingStorageTest,
       CacheCollatesLoadsCorrectlyWithMultipleInvalidationsInARow) {}

TEST_F(InterestGroupCachingStorageTest,
       CacheCollatesLoadsCorrectlyWithInvalidationsInterwovenWithLoads) {}

TEST_F(InterestGroupCachingStorageTest, NoCachingWhenFeatureDisabled) {}

TEST_F(InterestGroupCachingStorageTest, LoadGroupsCacheHitHistogram) {}

TEST_F(InterestGroupCachingStorageTest, DontLoadCachedInterestGroupsIfExpired) {}

TEST_F(InterestGroupCachingStorageTest, GetCachedOwnerAndSignalsOrigins) {}

}  // namespace content