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 82054eabc3364eec9c4900ef407f905347f7b92e..2898059f60131d05ace862ffb3d23a2a689ae1cd 100644 |
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc |
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc |
@@ -214,7 +214,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadInvalidUrl) { |
msg_loop_.Run(); |
EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
- // Only http is supported for now. |
+ // Only https is not supported for now for privacy reasons. |
info.local_file = FilePath(FILE_PATH_LITERAL("a.exe")); |
info.download_url_chain.push_back(GURL("https://www.google.com/")); |
download_service_->CheckClientDownload( |
@@ -223,14 +223,6 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadInvalidUrl) { |
base::Unretained(this))); |
msg_loop_.Run(); |
EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
- |
- info.download_url_chain[0] = GURL("ftp://www.google.com/"); |
- download_service_->CheckClientDownload( |
- info, |
- base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, |
- base::Unretained(this))); |
- msg_loop_.Run(); |
- EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
} |
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadWhitelistedUrl) { |
@@ -498,7 +490,8 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadDigestList) { |
EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
Mock::VerifyAndClearExpectations(sb_service_); |
- // A match is found with the bad binary digest list. |
+ // A match is found with the bad binary digest list. We currently do not |
+ // warn based on the digest list. Hence we should always return SAFE. |
EXPECT_CALL(*sb_service_, |
CheckDownloadHash(info.sha256_hash, NotNull())) |
.WillOnce(DoAll( |
@@ -509,7 +502,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadDigestList) { |
base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, |
base::Unretained(this))); |
msg_loop_.Run(); |
- EXPECT_EQ(DownloadProtectionService::DANGEROUS, result_); |
+ EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
Mock::VerifyAndClearExpectations(sb_service_); |
// If the download is not an executable we do not send a server ping but we |
@@ -526,7 +519,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadDigestList) { |
base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, |
base::Unretained(this))); |
msg_loop_.Run(); |
- EXPECT_EQ(DownloadProtectionService::DANGEROUS, result_); |
+ EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
Mock::VerifyAndClearExpectations(sb_service_); |
// If the URL or the referrer matches the download whitelist we cannot send |
@@ -547,7 +540,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadDigestList) { |
base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, |
base::Unretained(this))); |
msg_loop_.Run(); |
- EXPECT_EQ(DownloadProtectionService::DANGEROUS, result_); |
+ EXPECT_EQ(DownloadProtectionService::SAFE, result_); |
} |
TEST_F(DownloadProtectionServiceTest, TestCheckDownloadUrl) { |