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

Unified Diff: content/browser/loader/url_loader_factory_impl_unittest.cc

Issue 2785523002: Reduce/remove usage of BrowserThread in content/browser/loader. (Closed)
Patch Set: Fix test redness Created 3 years, 9 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/loader/url_loader_factory_impl.cc ('k') | content/public/test/test_renderer_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/url_loader_factory_impl_unittest.cc
diff --git a/content/browser/loader/url_loader_factory_impl_unittest.cc b/content/browser/loader/url_loader_factory_impl_unittest.cc
index 007dca1e4dc48f451a32610ebb7cac9b3a10ba68..ad3433aebadfd4598bf147019d3576d7c44ccac0 100644
--- a/content/browser/loader/url_loader_factory_impl_unittest.cc
+++ b/content/browser/loader/url_loader_factory_impl_unittest.cc
@@ -81,7 +81,8 @@ class RejectingResourceDispatcherHostDelegate final
class URLLoaderFactoryImplTest : public ::testing::TestWithParam<size_t> {
public:
URLLoaderFactoryImplTest()
- : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP),
+ : thread_bundle_(
+ new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)),
browser_context_(new TestBrowserContext()),
resource_message_filter_(new ResourceMessageFilter(
kChildId,
@@ -120,6 +121,7 @@ class URLLoaderFactoryImplTest : public ::testing::TestWithParam<size_t> {
base::RunLoop().RunUntilIdle();
MojoAsyncResourceHandler::SetAllocationSizeForTesting(
MojoAsyncResourceHandler::kDefaultAllocationSize);
+ thread_bundle_.reset(nullptr);
}
void GetContexts(ResourceType resource_type,
@@ -130,7 +132,7 @@ class URLLoaderFactoryImplTest : public ::testing::TestWithParam<size_t> {
browser_context_->GetResourceContext()->GetRequestContext();
}
- TestBrowserThreadBundle thread_bundle_;
+ std::unique_ptr<TestBrowserThreadBundle> thread_bundle_;
ananta 2017/03/29 19:41:04 This change was required to ensure that the thread
LoaderDelegateImpl loader_deleate_;
ResourceDispatcherHostImpl rdh_;
std::unique_ptr<TestBrowserContext> browser_context_;
« no previous file with comments | « content/browser/loader/url_loader_factory_impl.cc ('k') | content/public/test/test_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698