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

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

Issue 2487073005: Remove direct usage of BrowserThreadImpl in tests (Closed)
Patch Set: The RDHImpl is actually not even necessary in ResourceSchedulerTest, removed. Created 4 years, 1 month 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/browser_thread_impl.h ('k') | content/browser/download/download_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/base_file_unittest.cc
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index b5e21d6ab79ea20f93e3cebe4e1c96bc3ef0b55b..6b07d8d1315cc0b3fa6f58abba4f35f515dffcf8 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -13,12 +13,11 @@
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/test_file_util.h"
#include "build/build_config.h"
-#include "content/browser/browser_thread_impl.h"
#include "content/public/browser/download_interrupt_reasons.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "crypto/secure_hash.h"
#include "crypto/sha2.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -56,9 +55,7 @@ class BaseFileTest : public testing::Test {
BaseFileTest()
: expect_file_survives_(false),
expect_in_progress_(true),
- expected_error_(DOWNLOAD_INTERRUPT_REASON_NONE),
- file_thread_(BrowserThread::FILE, &message_loop_) {
- }
+ expected_error_(DOWNLOAD_INTERRUPT_REASON_NONE) {}
void SetUp() override {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -199,9 +196,7 @@ class BaseFileTest : public testing::Test {
std::string expected_data_;
DownloadInterruptReason expected_error_;
- // Mock file thread to satisfy debug checks in BaseFile.
- base::MessageLoop message_loop_;
- BrowserThreadImpl file_thread_;
+ TestBrowserThreadBundle thread_bundle_;
};
// This will initialize the entire array to zero.
« no previous file with comments | « content/browser/browser_thread_impl.h ('k') | content/browser/download/download_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698