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

Unified Diff: content/browser/loader/resource_scheduler_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
Index: content/browser/loader/resource_scheduler_unittest.cc
diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc
index 66aa0d419b31901b8dcd1487d203d0baa4fea99f..cc40deabab4fe1fdb38a41633d0203475fd831e1 100644
--- a/content/browser/loader/resource_scheduler_unittest.cc
+++ b/content/browser/loader/resource_scheduler_unittest.cc
@@ -8,19 +8,17 @@
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_vector.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/timer/mock_timer.h"
#include "base/timer/timer.h"
-#include "content/browser/browser_thread_impl.h"
-#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_controller.h"
#include "content/public/browser/resource_throttle.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_context.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "content/test/test_render_view_host_factory.h"
#include "content/test/test_web_contents.h"
#include "net/base/host_port_pair.h"
@@ -128,9 +126,7 @@ class FakeResourceContext : public ResourceContext {
class ResourceSchedulerTest : public testing::Test {
protected:
- ResourceSchedulerTest()
- : ui_thread_(BrowserThread::UI, &message_loop_),
- io_thread_(BrowserThread::IO, &message_loop_) {
+ ResourceSchedulerTest() {
InitializeScheduler();
context_.set_http_server_properties(&http_server_properties_);
}
@@ -246,10 +242,7 @@ class ResourceSchedulerTest : public testing::Test {
return scheduler_.get();
}
- base::MessageLoopForIO message_loop_;
- BrowserThreadImpl ui_thread_;
- BrowserThreadImpl io_thread_;
- ResourceDispatcherHostImpl rdh_;
+ TestBrowserThreadBundle thread_bundle_;
std::unique_ptr<ResourceScheduler> scheduler_;
base::MockTimer* mock_timer_;
net::HttpServerPropertiesImpl http_server_properties_;
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/browser/media/capture/audio_mirroring_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698