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

Unified Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 2890853002: Downloads: replace BrowserThread::FILE with task scheduler. (Closed)
Patch Set: Revert ScopedCOMInitializer invocations. Created 3 years, 5 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: content/browser/download/download_manager_impl_unittest.cc
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index ad9dd844c8016f52ab83b828cccabe536f0810ac..477d4ed3d709f5dde25a03450dceeceb5e9e418d 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -18,7 +18,6 @@
#include "base/guid.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
#include "base/strings/string16.h"
@@ -40,7 +39,7 @@
#include "content/public/browser/download_manager_delegate.h"
#include "content/public/test/mock_download_item.h"
#include "content/public/test/test_browser_context.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "net/log/net_log_with_source.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gmock_mutant.h"
@@ -389,8 +388,6 @@ class DownloadManagerTest : public testing::Test {
target_disposition_(DownloadItem::TARGET_DISPOSITION_OVERWRITE),
danger_type_(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS),
interrupt_reason_(DOWNLOAD_INTERRUPT_REASON_NONE),
- ui_thread_(BrowserThread::UI, &message_loop_),
- file_thread_(BrowserThread::FILE, &message_loop_),
next_download_id_(0) {}
// We tear down everything in TearDown().
@@ -527,9 +524,7 @@ class DownloadManagerTest : public testing::Test {
std::vector<GURL> download_urls_;
private:
- base::MessageLoopForUI message_loop_;
- TestBrowserThread ui_thread_;
- TestBrowserThread file_thread_;
+ TestBrowserThreadBundle thread_bundle_;
base::WeakPtr<MockDownloadItemFactory> mock_download_item_factory_;
std::unique_ptr<MockDownloadManagerDelegate> mock_download_manager_delegate_;
std::unique_ptr<MockBrowserContext> mock_browser_context_;

Powered by Google App Engine
This is Rietveld 408576698