| Index: components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
|
| diff --git a/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc b/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
|
| index 28b8f5108fc4637e128663879796331a3f62516f..529885046a8e11ad9511a089a9adaaa2102d9813 100644
|
| --- a/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
|
| +++ b/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
|
| @@ -90,8 +90,9 @@ TEST(SubresourceFilterFeaturesTest, ActivationLevel) {
|
| {kActivationScopeParameterName, kActivationScopeNoSites}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(test_case.expected_activation_level,
|
| actual_configuration.activation_level);
|
| EXPECT_EQ(ActivationScope::NO_SITES, actual_configuration.activation_scope);
|
| @@ -129,8 +130,9 @@ TEST(SubresourceFilterFeaturesTest, ActivationScope) {
|
| {kActivationScopeParameterName, test_case.activation_scope_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(ActivationLevel::DISABLED, actual_configuration.activation_level);
|
| EXPECT_EQ(test_case.expected_activation_scope,
|
| actual_configuration.activation_scope);
|
| @@ -182,8 +184,9 @@ TEST(SubresourceFilterFeaturesTest, ActivationLevelAndScope) {
|
| {kActivationScopeParameterName, test_case.activation_scope_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(test_case.expected_activation_level,
|
| actual_configuration.activation_level);
|
| EXPECT_EQ(test_case.expected_activation_scope,
|
| @@ -240,8 +243,9 @@ TEST(SubresourceFilterFeaturesTest, ActivationList) {
|
| {kActivationListsParameterName, test_case.activation_list_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(test_case.expected_activation_list,
|
| actual_configuration.activation_list);
|
| }
|
| @@ -278,8 +282,9 @@ TEST(SubresourceFilterFeaturesTest, PerfMeasurementRate) {
|
| test_case.perf_measurement_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(test_case.expected_perf_measurement_rate,
|
| actual_configuration.performance_measurement_rate);
|
| }
|
| @@ -313,8 +318,9 @@ TEST(SubresourceFilterFeaturesTest, SuppressNotifications) {
|
| test_case.suppress_notifications_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(test_case.expected_suppress_notifications_value,
|
| actual_configuration.should_suppress_notifications);
|
| }
|
| @@ -348,8 +354,9 @@ TEST(SubresourceFilterFeaturesTest, WhitelistSiteOnReload) {
|
| test_case.whitelist_site_on_reload_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(test_case.expected_whitelist_site_on_reload_value,
|
| actual_configuration.should_whitelist_site_on_reload);
|
| }
|
| @@ -375,8 +382,9 @@ TEST(SubresourceFilterFeaturesTest, RulesetFlavor) {
|
| {{kRulesetFlavorParameterName, test_case.ruleset_flavor_param}});
|
|
|
| const auto active_configurations = GetActiveConfigurations();
|
| + ASSERT_EQ(1u, active_configurations->ordered_configs().size());
|
| const Configuration& actual_configuration =
|
| - active_configurations->the_one_and_only();
|
| + active_configurations->ordered_configs().front();
|
| EXPECT_EQ(std::string(test_case.expected_ruleset_flavor_value),
|
| actual_configuration.ruleset_flavor);
|
| }
|
|
|