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

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

Issue 10907225: Add API keys to SafeBrowsing client-side phishing and download verdict requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/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 1bbeb6a1770a8f8565f18f58fe5fab172b718af6..9aead98243ff7e08841081fb839467415348ea8b 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -327,7 +327,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadFetchFailed) {
net::FakeURLFetcherFactory factory;
// HTTP request will fail.
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl, "", false);
+ DownloadProtectionService::GetDownloadRequestUrl(), "", false);
DownloadProtectionService::DownloadInfo info;
info.local_file = FilePath(FILE_PATH_LITERAL("a.tmp"));
@@ -353,7 +353,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
net::FakeURLFetcherFactory factory;
// Empty response means SAFE.
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
@@ -377,7 +377,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
// Invalid response should be safe too.
response.Clear();
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializePartialAsString(),
true);
@@ -391,7 +391,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
// If the response is dangerous the result should also be marked as dangerous.
response.set_verdict(ClientDownloadResponse::DANGEROUS);
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
@@ -409,7 +409,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
// If the response is uncommon the result should also be marked as uncommon.
response.set_verdict(ClientDownloadResponse::UNCOMMON);
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
@@ -430,7 +430,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadHTTPS) {
response.set_verdict(ClientDownloadResponse::DANGEROUS);
net::FakeURLFetcherFactory factory;
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
@@ -462,7 +462,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadZip) {
net::FakeURLFetcherFactory factory;
// Empty response means SAFE.
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
@@ -515,7 +515,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadZip) {
// dangerous.
response.set_verdict(ClientDownloadResponse::DANGEROUS);
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
@@ -566,7 +566,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientCrxDownloadSuccess) {
net::FakeURLFetcherFactory factory;
// Empty response means SAFE.
factory.SetFakeResponse(
- DownloadProtectionService::kDownloadRequestUrl,
+ DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
true);
« 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