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

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

Issue 7793012: Change the client-side phishing detection hashing function to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Brian's comments Created 9 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: chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
index 83ce5aa7ea41113d793c17656832c3e987997986..324f170d3c049d39c66551faaebd40d594e8e35f 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
@@ -666,7 +666,7 @@ TEST_F(ClientSideDetectionServiceTest, SetEnabled) {
TEST_F(ClientSideDetectionServiceTest, SanitizeRequestForPingback) {
ClientPhishingRequest request;
request.set_url("http://www.us.host.com/blah");
- request.set_suffix_prefix_hash("hash");
+ request.set_hash_prefix("hash");
request.set_client_score(0.8f);
request.set_is_phishing(true);
AddFeature(std::string(features::kUrlTldToken) + "com", 1.0, &request);
@@ -709,7 +709,7 @@ TEST_F(ClientSideDetectionServiceTest, SanitizeRequestForPingback) {
// For easier debugging, we'll check the output protobuf fields individually.
ClientPhishingRequest expected;
- expected.set_suffix_prefix_hash(request.suffix_prefix_hash());
+ expected.set_hash_prefix(request.hash_prefix());
expected.set_client_score(request.client_score());
expected.set_is_phishing(request.is_phishing());
AddFeature(features::kUrlNumOtherHostTokensGTOne, 1.0, &expected);
@@ -719,8 +719,7 @@ TEST_F(ClientSideDetectionServiceTest, SanitizeRequestForPingback) {
AddNonModelFeature(features::kUrlHistoryVisitCount, 5.0, &expected);
EXPECT_FALSE(sanitized_request.has_url());
- EXPECT_EQ(expected.suffix_prefix_hash(),
- sanitized_request.suffix_prefix_hash());
+ EXPECT_EQ(expected.hash_prefix(), sanitized_request.hash_prefix());
EXPECT_FLOAT_EQ(expected.client_score(), sanitized_request.client_score());
EXPECT_EQ(expected.is_phishing(), sanitized_request.is_phishing());
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_service.cc ('k') | chrome/common/safe_browsing/csd.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698