From 5713385882f91dd6c49701b377495dad31df7d19 Mon Sep 17 00:00:00 2001 From: "asanka@chromium.org" Date: Mon, 19 Sep 2011 23:06:42 +0000 Subject: Add a file thread to ResourceDispatcherHostTest. During content_unittests:ResourceDispatcherHostTest.IgnoreCancelForDownloads, DownloadResourceHandler releases a DownloadBuffer and posts a task to the FILE thread so that DownloadFileManager can handle the buffer. If there's no FILE thread, the download doesn't complete processing and the DownloadBuffer is leaked. BUG=Leak of DownloadBuffer during IgnoreCancelForDownloads test. TEST=valgrind tests Review URL: http://codereview.chromium.org/7941026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101858 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/renderer_host/resource_dispatcher_host_unittest.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'content') diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc index 8dfc1ad..7f9fa9a 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc @@ -258,6 +258,7 @@ class ResourceDispatcherHostTest : public testing::Test, public: ResourceDispatcherHostTest() : ui_thread_(BrowserThread::UI, &message_loop_), + file_thread_(BrowserThread::FILE, &message_loop_), io_thread_(BrowserThread::IO, &message_loop_), ALLOW_THIS_IN_INITIALIZER_LIST(filter_(new ForwardingFilter(this))), host_(ResourceQueue::DelegateSet()), @@ -386,6 +387,7 @@ class ResourceDispatcherHostTest : public testing::Test, MessageLoopForIO message_loop_; BrowserThread ui_thread_; + BrowserThread file_thread_; BrowserThread io_thread_; scoped_refptr filter_; ResourceDispatcherHost host_; -- cgit v1.1