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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_unittest.cc

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix ifndefs Created 9 years, 2 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 | « content/browser/renderer_host/resource_dispatcher_host.cc ('k') | content/browser/resource_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/resource_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
index 919674f4500cac30323dd29d957fbbcb83f7ba64..12f335b22a7982584bf6d73499882491ffac8d5b 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -12,6 +12,7 @@
#include "base/process_util.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/download/download_id.h"
+#include "content/browser/download/download_id_factory.h"
#include "content/browser/mock_resource_context.h"
#include "content/browser/renderer_host/dummy_resource_handler.h"
#include "content/browser/renderer_host/global_request_id.h"
@@ -1161,8 +1162,10 @@ TEST_F(ResourceDispatcherHostTest, IgnoreCancelForDownloads) {
HandleScheme("http");
MakeTestRequest(render_view_id, request_id, GURL("http://example.com/blah"));
- content::MockResourceContext::GetInstance()->set_next_download_id_thunk(
- base::Bind(&MockNextDownloadId));
+ scoped_refptr<DownloadIdFactory> id_factory(
+ new DownloadIdFactory("valid DownloadId::Domain"));
+ content::MockResourceContext::GetInstance()->set_download_id_factory(
+ id_factory);
// Return some data so that the request is identified as a download
// and the proper resource handlers are created.
EXPECT_TRUE(net::URLRequestTestJob::ProcessOnePendingMessage());
@@ -1198,8 +1201,10 @@ TEST_F(ResourceDispatcherHostTest, CancelRequestsForContext) {
HandleScheme("http");
MakeTestRequest(render_view_id, request_id, GURL("http://example.com/blah"));
- content::MockResourceContext::GetInstance()->set_next_download_id_thunk(
- base::Bind(&MockNextDownloadId));
+ scoped_refptr<DownloadIdFactory> id_factory(
+ new DownloadIdFactory("valid DownloadId::Domain"));
+ content::MockResourceContext::GetInstance()->set_download_id_factory(
+ id_factory);
// Return some data so that the request is identified as a download
// and the proper resource handlers are created.
EXPECT_TRUE(net::URLRequestTestJob::ProcessOnePendingMessage());
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host.cc ('k') | content/browser/resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698