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

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

Issue 12211076: Refactored FakeURLFetcher to make it more flexible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 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/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 0304c439a8ec8e12e6436af4e26d3d7ee7c00bf4..5af784c2cc4a65b86b464da80426ed5a220d7cc9 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -363,7 +363,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadWhitelistedUrl) {
}
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadFetchFailed) {
- net::FakeURLFetcherFactory factory;
+ net::FakeURLFetcherFactory factory(NULL);
// HTTP request will fail.
factory.SetFakeResponse(
DownloadProtectionService::GetDownloadRequestUrl(), "", false);
@@ -390,7 +390,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadFetchFailed) {
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
ClientDownloadResponse response;
response.set_verdict(ClientDownloadResponse::SAFE);
- net::FakeURLFetcherFactory factory;
+ net::FakeURLFetcherFactory factory(NULL);
// Empty response means SAFE.
factory.SetFakeResponse(
DownloadProtectionService::GetDownloadRequestUrl(),
@@ -488,7 +488,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadSuccess) {
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadHTTPS) {
ClientDownloadResponse response;
response.set_verdict(ClientDownloadResponse::DANGEROUS);
- net::FakeURLFetcherFactory factory;
+ net::FakeURLFetcherFactory factory(NULL);
factory.SetFakeResponse(
DownloadProtectionService::GetDownloadRequestUrl(),
response.SerializeAsString(),
@@ -520,7 +520,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadHTTPS) {
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadZip) {
ClientDownloadResponse response;
response.set_verdict(ClientDownloadResponse::SAFE);
- net::FakeURLFetcherFactory factory;
+ net::FakeURLFetcherFactory factory(NULL);
// Empty response means SAFE.
factory.SetFakeResponse(
DownloadProtectionService::GetDownloadRequestUrl(),
@@ -625,7 +625,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientCrxDownloadSuccess) {
// DownloadProtectionService::IsSupportedDownload() will return false
// for crx downloads.
response.set_verdict(ClientDownloadResponse::DANGEROUS);
- net::FakeURLFetcherFactory factory;
+ net::FakeURLFetcherFactory factory(NULL);
// Empty response means SAFE.
factory.SetFakeResponse(
DownloadProtectionService::GetDownloadRequestUrl(),
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_service_unittest.cc ('k') | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698