| Index: components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
|
| diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
|
| index e849b0df9f6ddd78e96dc648496a82c2af363a73..46a56f5b32bf160949ae2d511a37e9f9585c8254 100644
|
| --- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
|
| +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
|
| @@ -193,6 +193,46 @@ TEST_F(DataReductionProxyParamsTest, IsClientConfigEnabled) {
|
| }
|
| }
|
|
|
| +TEST_F(DataReductionProxyParamsTest, IsBrotliAcceptEncodingEnabled) {
|
| + const struct {
|
| + std::string test_case;
|
| + std::string trial_group_value;
|
| + bool expected;
|
| + } tests[] = {
|
| + {
|
| + "Nothing set", "", true,
|
| + },
|
| + {
|
| + "Enabled in experiment", "Enabled", true,
|
| + },
|
| + {
|
| + "Alternate enabled in experiment", "Enabled_Other", true,
|
| + },
|
| + {
|
| + "Control in experiment", "Control", true,
|
| + },
|
| + {
|
| + "Disabled in experiment", "Disabled", false,
|
| + },
|
| + {
|
| + "Disabled in experiment", "Disabled_Other", false,
|
| + },
|
| + {
|
| + "disabled in experiment lower case", "disabled", true,
|
| + },
|
| + };
|
| +
|
| + for (const auto& test : tests) {
|
| + base::FieldTrialList field_trial_list(nullptr);
|
| + if (!test.trial_group_value.empty()) {
|
| + ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
|
| + "DataReductionProxyBrotliAcceptEncoding", test.trial_group_value));
|
| + }
|
| + EXPECT_EQ(test.expected, params::IsBrotliAcceptEncodingEnabled())
|
| + << test.test_case;
|
| + }
|
| +}
|
| +
|
| TEST_F(DataReductionProxyParamsTest, AreServerExperimentsEnabled) {
|
| const struct {
|
| std::string test_case;
|
|
|