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

Unified Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 10836206: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small fix Created 8 years, 4 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/profiles/profile_io_data.cc ('k') | net/url_request/url_request_about_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5fc8099df953eec2a225be57dca0132b6eaa231e..418cf7ea07a739e656658319e922f5a237821ef2 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"
@@ -220,6 +221,10 @@ class ProxyScriptFetcherImplTest : public PlatformTest {
};
TEST_F(ProxyScriptFetcherImplTest, FileUrl) {
+ URLRequestJobFactory job_factory;
+ job_factory.SetProtocolHandler("file", new FileProtocolHandler());
+ context_.set_job_factory(&job_factory);
+
ProxyScriptFetcherImpl pac_fetcher(&context_);
{ // Fetch a non-existent file.
@@ -353,6 +358,10 @@ TEST_F(ProxyScriptFetcherImplTest, NoCache) {
TEST_F(ProxyScriptFetcherImplTest, TooLarge) {
ASSERT_TRUE(test_server_.Start());
+ URLRequestJobFactory 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.
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | net/url_request/url_request_about_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698