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

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

Issue 586793003: Safebrowsing: Honor the metadata from malware fullhash results in SB API 3.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes for sky Created 6 years, 3 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 | « chrome/browser/safe_browsing/database_manager.cc ('k') | chrome/browser/safe_browsing/metadata.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/database_manager_unittest.cc
diff --git a/chrome/browser/safe_browsing/database_manager_unittest.cc b/chrome/browser/safe_browsing/database_manager_unittest.cc
index 5639046de527bcd8892cac6d2d0dd3fa77d59f16..915790f132e3848901a75ff8240da69c981a3d8d 100644
--- a/chrome/browser/safe_browsing/database_manager_unittest.cc
+++ b/chrome/browser/safe_browsing/database_manager_unittest.cc
@@ -116,15 +116,20 @@ TEST_F(SafeBrowsingDatabaseManagerTest, GetUrlThreatType) {
SafeBrowsingDatabaseManager::GetHashThreatType(
kSafeHostHash, full_hashes));
+ size_t index = 100;
EXPECT_EQ(SB_THREAT_TYPE_URL_MALWARE,
SafeBrowsingDatabaseManager::GetUrlThreatType(
- kMalwareUrl, full_hashes));
+ kMalwareUrl, full_hashes, &index));
+ EXPECT_EQ(0U, index);
EXPECT_EQ(SB_THREAT_TYPE_URL_PHISHING,
SafeBrowsingDatabaseManager::GetUrlThreatType(
- kPhishingUrl, full_hashes));
+ kPhishingUrl, full_hashes, &index));
+ EXPECT_EQ(1U, index);
+ index = 100;
EXPECT_EQ(SB_THREAT_TYPE_SAFE,
SafeBrowsingDatabaseManager::GetUrlThreatType(
- kSafeUrl, full_hashes));
+ kSafeUrl, full_hashes, &index));
+ EXPECT_EQ(100U, index);
}
« no previous file with comments | « chrome/browser/safe_browsing/database_manager.cc ('k') | chrome/browser/safe_browsing/metadata.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698