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

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

Issue 1918353002: Bug fix in sampling whitelisted download. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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/download_protection_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/download_protection_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index d8b762ccec5fa0a8973790a30592d3c4bea34327..d5f105c287ea659bb626b436a88c93659707a678 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -646,6 +646,8 @@ TEST_F(DownloadProtectionServiceTest,
EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));
EXPECT_TRUE(HasClientDownloadRequest());
+ EXPECT_FALSE(GetClientDownloadRequest()->skipped_url_whitelist());
+ EXPECT_FALSE(GetClientDownloadRequest()->skipped_certificate_whitelist());
ClearClientDownloadRequest();
// Check that the referrer is not matched against the whitelist.
@@ -658,6 +660,8 @@ TEST_F(DownloadProtectionServiceTest,
EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));
EXPECT_TRUE(HasClientDownloadRequest());
+ EXPECT_FALSE(GetClientDownloadRequest()->skipped_url_whitelist());
+ EXPECT_FALSE(GetClientDownloadRequest()->skipped_certificate_whitelist());
ClearClientDownloadRequest();
// Redirect from a site shouldn't be checked either.
@@ -670,6 +674,8 @@ TEST_F(DownloadProtectionServiceTest,
EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));
EXPECT_TRUE(HasClientDownloadRequest());
+ EXPECT_FALSE(GetClientDownloadRequest()->skipped_url_whitelist());
+ EXPECT_FALSE(GetClientDownloadRequest()->skipped_certificate_whitelist());
ClearClientDownloadRequest();
// Only if the final url is whitelisted should it be SAFE.
« no previous file with comments | « chrome/browser/safe_browsing/download_protection_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698