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

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

Issue 1655113002: Add a new ThreatSource type to indicate SBHit is from client side detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit_tests and histogram Created 4 years, 11 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/client_side_detection_host_unittest.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index 457afd320d659939fe475f03dbc76336422a7c5a..0438fd75e6dce1d088a47d4ba354ac8d670f5cc9 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -559,6 +559,7 @@ TEST_F(ClientSideDetectionHostTest, OnPhishingDetectionDoneShowInterstitial) {
EXPECT_EQ(phishing_url, resource.original_url);
EXPECT_FALSE(resource.is_subresource);
EXPECT_EQ(SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL, resource.threat_type);
+ EXPECT_EQ(ThreatSource::CLIENT_SIDE_DETECTION, resource.threat_source);
EXPECT_EQ(web_contents()->GetRenderProcessHost()->GetID(),
resource.render_process_host_id);
EXPECT_EQ(web_contents()->GetMainFrame()->GetRoutingID(),
@@ -647,6 +648,7 @@ TEST_F(ClientSideDetectionHostTest, OnPhishingDetectionDoneMultiplePings) {
EXPECT_EQ(other_phishing_url, resource.original_url);
EXPECT_FALSE(resource.is_subresource);
EXPECT_EQ(SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL, resource.threat_type);
+ EXPECT_EQ(ThreatSource::CLIENT_SIDE_DETECTION, resource.threat_source);
EXPECT_EQ(web_contents()->GetRenderProcessHost()->GetID(),
resource.render_process_host_id);
EXPECT_EQ(web_contents()->GetMainFrame()->GetRoutingID(),
@@ -862,6 +864,7 @@ TEST_F(ClientSideDetectionHostTest,
EXPECT_EQ(malware_landing_url, resource.original_url);
EXPECT_TRUE(resource.is_subresource);
EXPECT_EQ(SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL, resource.threat_type);
+ EXPECT_EQ(ThreatSource::CLIENT_SIDE_DETECTION, resource.threat_source);
EXPECT_EQ(web_contents()->GetRenderProcessHost()->GetID(),
resource.render_process_host_id);
EXPECT_EQ(web_contents()->GetMainFrame()->GetRoutingID(),
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_host.cc ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698