#include "base/test/scoped_feature_list.h"
#include <map>
#include <string>
#include <utility>
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace test {
namespace {
BASE_FEATURE(…);
BASE_FEATURE(…);
void ExpectFeatures(const std::string& enabled_features,
const std::string& disabled_features) { … }
std::string GetActiveFieldTrialGroupName(const std::string trial_name) { … }
}
class ScopedFeatureListTest : public testing::Test { … };
TEST_F(ScopedFeatureListTest, BasicScoped) { … }
TEST_F(ScopedFeatureListTest, InitFromCommandLineWithFeatureParams) { … }
TEST_F(ScopedFeatureListTest, EnableWithFeatureParameters) { … }
TEST_F(ScopedFeatureListTest, OverrideWithFeatureParameters) { … }
TEST_F(ScopedFeatureListTest, OverrideWithFeatureMultipleParameters) { … }
TEST_F(ScopedFeatureListTest, OverrideMultipleFeaturesWithParameters) { … }
TEST_F(ScopedFeatureListTest, ParamsWithSpecialCharsPreserved) { … }
TEST_F(ScopedFeatureListTest, ParamsWithEmptyValue) { … }
TEST_F(ScopedFeatureListTest, EnableFeatureOverrideDisable) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideNotMakeDuplicate) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideFeatureWithDefault) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideFeatureWithDefault2) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideFeatureWithEnabledFieldTrial) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideFeatureWithDisabledFieldTrial) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideKeepsOtherExistingFeature) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideKeepsOtherExistingFeature2) { … }
TEST_F(ScopedFeatureListTest, FeatureOverrideKeepsOtherExistingDefaultFeature) { … }
TEST_F(ScopedFeatureListTest, ScopedFeatureListIsNoopWhenNotInitialized) { … }
TEST_F(ScopedFeatureListTest,
RestoreFieldTrialParamsCorrectlyWhenLeakedFieldTrialCreated) { … }
TEST(ScopedFeatureListTestWithMemberList, ScopedFeatureListLocalOverride) { … }
TEST_F(ScopedFeatureListTest, InitWithFeatureStates) { … }
}
}