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

Unified Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 7 years, 11 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: net/proxy/proxy_script_fetcher_impl_unittest.cc
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index f7ca2b42aba440c96591da4312643493597a4905..d143b1f3e8694f33fa9eee8c481fdc93bad01b04 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -21,6 +21,7 @@
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
#include "net/test/test_server.h"
+#include "net/url_request/file_protocol_handler.h"
#include "net/url_request/url_request_context_storage.h"
#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_job_factory_impl.h"
@@ -195,6 +196,10 @@ class ProxyScriptFetcherImplTest : public PlatformTest {
};
TEST_F(ProxyScriptFetcherImplTest, FileUrl) {
+ URLRequestJobFactoryImpl job_factory;
+ job_factory.SetProtocolHandler("file", new FileProtocolHandler());
+ context_.set_job_factory(&job_factory);
+
ProxyScriptFetcherImpl pac_fetcher(&context_);
{ // Fetch a non-existent file.
@@ -338,6 +343,10 @@ TEST_F(ProxyScriptFetcherImplTest, NoCache) {
TEST_F(ProxyScriptFetcherImplTest, TooLarge) {
ASSERT_TRUE(test_server_.Start());
+ URLRequestJobFactoryImpl job_factory;
+ job_factory.SetProtocolHandler("file", new FileProtocolHandler());
+ context_.set_job_factory(&job_factory);
+
ProxyScriptFetcherImpl pac_fetcher(&context_);
// Set the maximum response size to 50 bytes.

Powered by Google App Engine
This is Rietveld 408576698