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

Unified Diff: components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc

Issue 2272323002: Allow Safe Browsing Saresource Filter to distinguish between different lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allow Safe Browsing Saresource Filter to distinguish between different lists. Created 4 years, 4 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: components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
diff --git a/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc b/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
index a3d3222ecc66b9c71d26b07c7265adf5469581b1..5233d5aa87fbb848d47e0220a822fb5797174905 100644
--- a/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
+++ b/components/subresource_filter/content/browser/subresource_filter_navigation_throttle_unittests.cc
@@ -134,7 +134,7 @@ TEST_F(SubresourceFilterNavigationThrottleTest, RequestWithoutRedirects) {
SetUpNavigationHandleForURL(url);
SimulateWillStart();
factory()->OnMainResourceMatchedSafeBrowsingBlacklist(
- url, std::vector<GURL>(),
+ url, std::vector<GURL>(), safe_browsing::SB_THREAT_TYPE_URL_PHISHING,
safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
EXPECT_CALL(*driver(), ActivateForProvisionalLoad(ActivationState::ENABLED))
.Times(1);
@@ -157,6 +157,7 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
factory()->OnMainResourceMatchedSafeBrowsingBlacklist(
url_with_activation, std::vector<GURL>(),
+ safe_browsing::SB_THREAT_TYPE_URL_PHISHING,
safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
SetUpNavigationHandleForURL(url_without_activation);
@@ -182,6 +183,7 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
factory()->OnMainResourceMatchedSafeBrowsingBlacklist(
non_web_url, std::vector<GURL>(),
+ safe_browsing::SB_THREAT_TYPE_URL_PHISHING,
safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
SetUpNavigationHandleForURL(non_web_url);
@@ -211,7 +213,7 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
SetUpNavigationHandleForURL(url);
SimulateWillStart();
factory()->OnMainResourceMatchedSafeBrowsingBlacklist(
- url, std::vector<GURL>(),
+ url, std::vector<GURL>(), safe_browsing::SB_THREAT_TYPE_URL_PHISHING,
safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
SimulateRedirects(redirect);
@@ -248,7 +250,8 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
std::vector<GURL> redirects = {first_redirect, second_redirect,
third_redirect};
factory()->OnMainResourceMatchedSafeBrowsingBlacklist(
- url, redirects, safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
+ url, redirects, safe_browsing::SB_THREAT_TYPE_URL_PHISHING,
+ safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
SimulateRedirects(redirect_after_sb_classification);
@@ -278,7 +281,7 @@ TEST_F(SubresourceFilterNavigationThrottleTest,
const GURL final_url(kRedirectURLSecond);
std::vector<GURL> redirects = {redirect_with_match};
factory()->OnMainResourceMatchedSafeBrowsingBlacklist(
- init_url, redirects,
+ init_url, redirects, safe_browsing::SB_THREAT_TYPE_URL_PHISHING,
safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS);
SetUpNavigationHandleForURL(init_url);

Powered by Google App Engine
This is Rietveld 408576698