Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1223)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 2838193002: Split the ScopedSubresourceFilterFeatureToggle into two helper classes. (Closed)
Patch Set: Rebase. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index ab5ca80da4348a89bc77424290bfcc1f1d0548e9..f48133d75299e3e195d52d5ebde31feefb00739d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -62,6 +62,9 @@
#include "components/safe_browsing_db/v4_protocol_manager_util.h"
#include "components/subresource_filter/core/browser/subresource_filter_features.h"
#include "components/subresource_filter/core/browser/subresource_filter_features_test_support.h"
+#include "components/subresource_filter/core/common/activation_level.h"
+#include "components/subresource_filter/core/common/activation_list.h"
+#include "components/subresource_filter/core/common/activation_state.h"
#include "components/subresource_filter/core/common/test_ruleset_creator.h"
#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/navigation_entry.h"
@@ -904,12 +907,11 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, MainFrameHitWithReferrer) {
}
IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SubresourceFilterEndToEndTest) {
- subresource_filter::testing::ScopedSubresourceFilterFeatureToggle
- scoped_feature_toggle(
- base::FeatureList::OVERRIDE_ENABLE_FEATURE,
- subresource_filter::kActivationLevelEnabled,
- subresource_filter::kActivationScopeActivationList,
- subresource_filter::kActivationListSocialEngineeringAdsInterstitial);
+ subresource_filter::testing::ScopedSubresourceFilterConfigurator
+ scoped_configuration(subresource_filter::Configuration(
+ subresource_filter::ActivationLevel::ENABLED,
+ subresource_filter::ActivationScope::ACTIVATION_LIST,
+ subresource_filter::ActivationList::SOCIAL_ENG_ADS_INTERSTITIAL));
subresource_filter::testing::TestRulesetCreator ruleset_creator;
subresource_filter::testing::TestRulesetPair test_ruleset_pair;
@@ -1977,12 +1979,11 @@ IN_PROC_BROWSER_TEST_F(V4SafeBrowsingServiceTest, MainFrameHitWithReferrer) {
IN_PROC_BROWSER_TEST_F(V4SafeBrowsingServiceTest,
SubresourceFilterEndToEndTest) {
- subresource_filter::testing::ScopedSubresourceFilterFeatureToggle
- scoped_feature_toggle(
- base::FeatureList::OVERRIDE_ENABLE_FEATURE,
- subresource_filter::kActivationLevelEnabled,
- subresource_filter::kActivationScopeActivationList,
- subresource_filter::kActivationListSocialEngineeringAdsInterstitial);
+ subresource_filter::testing::ScopedSubresourceFilterConfigurator
+ scoped_configuration(subresource_filter::Configuration(
+ subresource_filter::ActivationLevel::ENABLED,
+ subresource_filter::ActivationScope::ACTIVATION_LIST,
+ subresource_filter::ActivationList::SOCIAL_ENG_ADS_INTERSTITIAL));
subresource_filter::testing::TestRulesetCreator ruleset_creator;
subresource_filter::testing::TestRulesetPair test_ruleset_pair;

Powered by Google App Engine
This is Rietveld 408576698