chromium/components/privacy_sandbox/tracking_protection_settings_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/privacy_sandbox/tracking_protection_settings.h"

#include <memory>
#include <utility>

#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/content_settings/core/common/pref_names.h"
#include "components/content_settings/core/test/content_settings_mock_provider.h"
#include "components/content_settings/core/test/content_settings_test_utils.h"
#include "components/prefs/testing_pref_service.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/privacy_sandbox/privacy_sandbox_prefs.h"
#include "components/privacy_sandbox/tracking_protection_prefs.h"
#include "components/privacy_sandbox/tracking_protection_settings_observer.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "components/version_info/channel.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace privacy_sandbox {
namespace {

class MockTrackingProtectionSettingsObserver
    : public TrackingProtectionSettingsObserver {};

class TrackingProtectionSettingsTest : public testing::Test {};

// Gets prefs

TEST_F(TrackingProtectionSettingsTest, ReturnsDoNotTrackStatus) {}

TEST_F(TrackingProtectionSettingsTest, ReturnsIpProtectionStatus) {}

TEST_F(TrackingProtectionSettingsTest, ReturnsTrackingProtection3pcdStatus) {}

TEST_F(TrackingProtectionSettingsTest, AreAll3pcBlockedTrueInIncognito) {}

TEST_F(TrackingProtectionSettingsTest, AreAll3pcBlockedFalseOutside3pcd) {}

TEST_F(TrackingProtectionSettingsTest,
       GetTrackingProtectionSettingReturnsAllow) {}

TEST_F(TrackingProtectionSettingsTest,
       GetTrackingProtectionSettingReturnsBlockByDefault) {}

TEST_F(TrackingProtectionSettingsTest,
       GetTrackingProtectionSettingFillsSettingInfo) {}

TEST_F(TrackingProtectionSettingsTest,
       AddTrackingProtectionExceptionAddsContentSetting) {}

TEST_F(
    TrackingProtectionSettingsTest,
    AddTrackingProtectionExceptionAddsContentSettingWithUserBypassException) {}

TEST_F(TrackingProtectionSettingsTest,
       RemoveTrackingProtectionExceptionRemovesContentSetting) {}

TEST_F(TrackingProtectionSettingsTest,
       AddThenRemoveTrackingProtectionExceptionResetsContentSetting) {}

// Sets prefs

TEST_F(TrackingProtectionSettingsTest,
       DisablesTrackingProtection3pcdWhenEnterpriseControlEnabled) {}

// Calls observers

TEST_F(TrackingProtectionSettingsTest, CorrectlyCallsObserversForDoNotTrack) {}

TEST_F(TrackingProtectionSettingsTest, CorrectlyCallsObserversForIpProtection) {}

TEST_F(TrackingProtectionSettingsTest, CorrectlyCallsObserversForBlockAll3pc) {}

}  // namespace
}  // namespace privacy_sandbox