#include "components/subresource_filter/core/browser/subresource_filter_features.h"
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "components/subresource_filter/core/browser/subresource_filter_features_test_support.h"
#include "components/subresource_filter/core/common/common_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace subresource_filter {
namespace {
class ScopedExperimentalStateToggle { … };
void ExpectAndRetrieveExactlyOneEnabledConfig(Configuration* actual_config) { … }
void ExpectAndRetrieveExactlyOneExtraEnabledConfig(
Configuration* actual_config) { … }
void ExpectPresetCanBeEnabledByName(Configuration preset, const char* name) { … }
void ExpectParamsGeneratePreset(
Configuration preset,
std::map<std::string, std::string> variation_params) { … }
}
class SubresourceFilterFeaturesTest : public ::testing::Test { … };
TEST_F(SubresourceFilterFeaturesTest, ActivationLevel) { … }
TEST_F(SubresourceFilterFeaturesTest, ActivationScope) { … }
TEST_F(SubresourceFilterFeaturesTest, ActivationLevelAndScope) { … }
TEST_F(SubresourceFilterFeaturesTest, ActivationList) { … }
TEST_F(SubresourceFilterFeaturesTest, ActivationPriority) { … }
TEST_F(SubresourceFilterFeaturesTest, PerfMeasurementRate) { … }
TEST_F(SubresourceFilterFeaturesTest, RulesetFlavor) { … }
TEST_F(SubresourceFilterFeaturesTest, LexicographicallyGreatestRulesetFlavor) { … }
TEST_F(SubresourceFilterFeaturesTest, EnabledConfigurations_FeatureDisabled) { … }
TEST_F(SubresourceFilterFeaturesTest,
EnabledConfigurations_FeatureEnabledWithNoParameters) { … }
TEST_F(SubresourceFilterFeaturesTest,
PresetForPerformanceTestingDryRunOnAllSites) { … }
TEST_F(SubresourceFilterFeaturesTest, PresetForLiveRunOnBetterAdsSites) { … }
TEST_F(SubresourceFilterFeaturesTest, ConfigurationPriorities) { … }
TEST_F(SubresourceFilterFeaturesTest, EnableDisableMultiplePresets) { … }
TEST_F(SubresourceFilterFeaturesTest,
EnableMultiplePresetsAndExperimentalConfig) { … }
TEST_F(SubresourceFilterFeaturesTest, AdTagging_EnablesDryRun) { … }
TEST_F(SubresourceFilterFeaturesTest, AdTaggingDisabled_DisablesDryRun) { … }
}