chromium/chrome/browser/content_settings/generated_notification_pref_unittest.cc

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

#include "chrome/browser/content_settings/generated_notification_pref.h"

#include "base/ranges/algorithm.h"
#include "chrome/browser/content_settings/generated_permission_prompting_behavior_pref.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/extensions/api/settings_private/generated_pref_test_base.h"
#include "chrome/test/base/testing_profile.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/sync_preferences/testing_pref_service_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"

settings_api;
settings_private;

namespace content_settings {

namespace {

// Sets the value of |generated_pref| to |pref_value| and then ensures
// that the notification content settings and preferences match
// |expected_content_setting| and |expected_quieter_ui|. The value of
// the new PrefObject returned by the |generated_pref| is then checked
// against |pref_value|.
void ValidateGeneratedPrefSetting(
    HostContentSettingsMap* map,
    sync_preferences::TestingPrefServiceSyncable* prefs,
    GeneratedNotificationPref* generated_pref,
    SettingsState pref_value,
    ContentSetting expected_content_setting,
    bool expected_quieter_ui) {}

const SettingsState kNoRecommendedValue =;

// Represents a set of settings, preferences and the associated expected
// fields for the returned preference object.
struct NotificationSettingManagedTestCase {};

static const std::vector<NotificationSettingManagedTestCase> managed_test_cases{};

void SetupManagedTestConditions(
    HostContentSettingsMap* map,
    sync_preferences::TestingPrefServiceSyncable* prefs,
    const NotificationSettingManagedTestCase& test_case) {}

void ValidateManagedPreference(
    settings_api::PrefObject& pref,
    const NotificationSettingManagedTestCase& test_case) {}

}  // namespace

GeneratedNotificationPrefTest;

TEST_F(GeneratedNotificationPrefTest, UpdatePreference) {}

TEST_F(GeneratedNotificationPrefTest, UpdatePreferenceInvalidAction) {}

TEST_F(GeneratedNotificationPrefTest, NotifyPrefUpdates) {}

TEST_F(GeneratedNotificationPrefTest, ManagedState) {}

}  // namespace content_settings