chromium/components/subresource_filter/content/browser/subresource_filter_content_settings_manager_unittest.cc

// Copyright 2017 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/subresource_filter/content/browser/subresource_filter_content_settings_manager.h"

#include <optional>
#include <set>
#include <string>

#include "base/run_loop.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/simple_test_clock.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace subresource_filter {

namespace {

class SubresourceFilterContentSettingsManagerTest : public testing::Test {};

TEST_F(SubresourceFilterContentSettingsManagerTest, LogDefaultSetting) {}

TEST_F(SubresourceFilterContentSettingsManagerTest,
       SetSiteMetadataBasedOnActivation) {}

TEST_F(SubresourceFilterContentSettingsManagerTest,
       NoSiteMetadata_SiteActivationFalse) {}

TEST_F(SubresourceFilterContentSettingsManagerTest,
       MetadataExpiryFollowingActivation) {}

// TODO(crbug.com/40710549): Remove test once ability to persist metadata
// is removed from the subresource filter content settings manager.
TEST_F(SubresourceFilterContentSettingsManagerTest,
       MetadataExpiryFavorsAdsIntervention) {}

TEST_F(SubresourceFilterContentSettingsManagerTest,
       AdsInterventionMetadata_ExpiresAfterDuration) {}

TEST_F(SubresourceFilterContentSettingsManagerTest,
       AdditionalMetadata_SetInMetadata) {}

// TODO(crbug.com/40710549): Remove test once ability to persist metadata
// is removed from the subresource filter content settings manager.
TEST_F(SubresourceFilterContentSettingsManagerTest,
       AdditionalMetadata_PersistedWithAdsIntervention) {}

// Verifies that the site activation status is True when there is
// metadata without an explicit site activation status key value
// pair in the metadata.
TEST_F(SubresourceFilterContentSettingsManagerTest,
       SiteMetadataWithoutActivationStatus_SiteActivationTrue) {}

TEST_F(SubresourceFilterContentSettingsManagerTest, SmartUI) {}

TEST_F(SubresourceFilterContentSettingsManagerTest, NoSmartUI) {}

TEST_F(SubresourceFilterContentSettingsManagerTest,
       DefaultSettingsChange_NoWebsiteMetadata) {}

// Tests that ClearSiteMetadata(origin) will result in clearing metadata for all
// sites whose origin is |origin|, but will not clear metadata for sites with
// different origins.
TEST_F(SubresourceFilterContentSettingsManagerTest, ClearSiteMetadata) {}

// Tests that ClearMetadataForAllSites() does indeed clear metadata for all
// sites.
TEST_F(SubresourceFilterContentSettingsManagerTest, ClearMetadataForAllSites) {}

}  // namespace

}  // namespace subresource_filter