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

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

Issue 2396133003: Change the logic how Subesource Filter propagates activation. (Closed)
Patch Set: fix tests Created 4 years, 2 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
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f03120c7117e491e86af228ddd6861b7ce7eb27..dd49ee7c2699b03eb70fd93164e677a6f31ee2be 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -926,17 +926,25 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest,
subresource_filter::ContentSubresourceFilterDriverFactory::
FromWebContents(web_contents);
- EXPECT_EQ(0U, driver_factory->activation_set().size());
+ EXPECT_EQ(0U,
+ driver_factory->safe_browsing_blacklisted_patterns_set().size());
chrome::NavigateParams params(browser(), bad_url, ui::PAGE_TRANSITION_LINK);
ui_test_utils::NavigateToURL(&params);
-
- EXPECT_EQ(1U, driver_factory->activation_set().size());
+ EXPECT_EQ(1U,
+ driver_factory->safe_browsing_blacklisted_patterns_set().size());
EXPECT_TRUE(got_hit_report());
}
IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SocEngReportingBlacklistEmpty) {
// Tests that URLS which doesn't belong to the SOCIAL_ENGINEERING_ADS threat
// type aren't seen by the Subresource Filter.
+ subresource_filter::testing::ScopedSubresourceFilterFeatureToggle
+ scoped_feature_toggle(
+ base::FeatureList::OVERRIDE_ENABLE_FEATURE,
+ subresource_filter::kActivationStateEnabled,
+ subresource_filter::kActivationScopeNoSites,
+ subresource_filter::kActivationListSocialEngineeringAdsInterstitial);
+
GURL bad_url = embedded_test_server()->GetURL(kMalwarePage);
SBFullHashResult malware_full_hash;
@@ -951,11 +959,12 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SocEngReportingBlacklistEmpty) {
subresource_filter::ContentSubresourceFilterDriverFactory::
FromWebContents(web_contents);
- EXPECT_EQ(0U, driver_factory->activation_set().size());
+ EXPECT_EQ(0U,
+ driver_factory->safe_browsing_blacklisted_patterns_set().size());
chrome::NavigateParams params(browser(), bad_url, ui::PAGE_TRANSITION_LINK);
ui_test_utils::NavigateToURL(&params);
-
- EXPECT_EQ(0U, driver_factory->activation_set().size());
+ EXPECT_EQ(0U,
+ driver_factory->safe_browsing_blacklisted_patterns_set().size());
EXPECT_TRUE(got_hit_report());
}
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698