Index: components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc |
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc |
index 48ba44860aee0d666e5121a5b11f5622a24f4feb..8793a243cf1a30bf04f9ec2a55193fd3ffcc0ca2 100644 |
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc |
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc |
@@ -311,18 +311,20 @@ |
navigation_simulator->SetTransition(transition); |
navigation_simulator->Start(); |
+ if (blacklisted_urls.front()) { |
+ factory()->OnMainResourceMatchedSafeBrowsingBlacklist( |
+ navigation_chain.front(), threat_type, threat_type_metadata); |
+ } |
::testing::Mock::VerifyAndClearExpectations(client()); |
- for (size_t i = 1; i < navigation_chain.size(); ++i) |
- navigation_simulator->Redirect(navigation_chain[i]); |
- |
- if (blacklisted_urls.size() != navigation_chain.size() || |
- !blacklisted_urls.back()) { |
- threat_type = safe_browsing::SBThreatType::SB_THREAT_TYPE_SAFE; |
- threat_type_metadata = safe_browsing::ThreatPatternType::NONE; |
+ |
+ for (size_t i = 1; i < navigation_chain.size(); ++i) { |
+ const GURL url = navigation_chain[i]; |
+ if (i < blacklisted_urls.size() && blacklisted_urls[i]) { |
+ factory()->OnMainResourceMatchedSafeBrowsingBlacklist( |
+ url, threat_type, threat_type_metadata); |
+ } |
+ navigation_simulator->Redirect(url); |
} |
- factory()->OnSafeBrowsingMatchComputed( |
- navigation_simulator->GetNavigationHandle(), threat_type, |
- threat_type_metadata); |
std::string suffix; |
ActivationList activation_list = |
GetListForThreatTypeAndMetadata(threat_type, threat_type_metadata); |