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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api_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/android/android_protocol_adapter.cc ('k') | chrome/browser/net/about_protocol_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index 8976a1d76fe5984c7c9268c77869de12e345a34e..0343c62f0d55382d8df19d576ec70319094cee30 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/extensions/api/web_request/web_request_api_constants.h"
#include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
+#include "chrome/browser/net/about_protocol_handler.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/pref_names.h"
@@ -32,6 +33,7 @@
#include "net/base/mock_host_resolver.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request_test_util.h"
+#include "net/url_request/url_request_job_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace helpers = extension_web_request_api_helpers;
@@ -167,6 +169,10 @@ TEST_F(ExtensionWebRequestTest, BlockingEventPrecedenceRedirect) {
filter, ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING,
ipc_sender_factory.GetWeakPtr());
+ net::URLRequestJobFactory job_factory;
+ job_factory.SetProtocolHandler("about", new net::AboutProtocolHandler());
+ context_->set_job_factory(&job_factory);
+
GURL redirect_url("about:redirected");
GURL not_chosen_redirect_url("about:not_chosen");
« no previous file with comments | « chrome/browser/android/android_protocol_adapter.cc ('k') | chrome/browser/net/about_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698