chromium/components/unified_consent/consent_throttle_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 "components/unified_consent/consent_throttle.h"
#include <memory>

#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "components/unified_consent/url_keyed_data_collection_consent_helper.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace unified_consent {
namespace {

class TestUrlKeyedDataCollectionConsentHelper
    : public UrlKeyedDataCollectionConsentHelper {};

class ConsentThrottleTest : public testing::Test {};

TEST_F(ConsentThrottleTest, EnabledAndDisabledRunSynchronously) {}

TEST_F(ConsentThrottleTest, ExpireOldRequests) {}

TEST_F(ConsentThrottleTest, InitializationFulfillsAllQueuedRequests) {}

TEST_F(ConsentThrottleTest, InitializationDisabledCase) {}

// In production, sometimes the callback to a request enqueues a new request.
// This tests this case and fixes the crash in https://crbug.com/1483454.
TEST_F(ConsentThrottleTest, CallbacksMakingNewRequests) {}

}  // namespace
}  // namespace unified_consent