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

Unified Diff: content/network/url_loader_unittest.cc

Issue 2951813002: Make URLRequestContextBuilder use base/task_scheduler/ (Closed)
Patch Set: Fix Created 3 years, 6 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/network/url_loader_unittest.cc
diff --git a/content/network/url_loader_unittest.cc b/content/network/url_loader_unittest.cc
index b2021eb0e58547c50756b8f3732f031417fc469c..20fcbe1d563acd9d49d0af63fdc0d3fcb2ee4cbd 100644
--- a/content/network/url_loader_unittest.cc
+++ b/content/network/url_loader_unittest.cc
@@ -3,9 +3,9 @@
// found in the LICENSE file.
#include "base/files/file_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/loader/test_url_loader_client.h"
#include "content/network/network_context.h"
@@ -66,7 +66,10 @@ std::string ReadData(MojoHandle consumer, size_t size) {
class URLLoaderImplTest : public testing::Test {
public:
- URLLoaderImplTest() : context_(NetworkContext::CreateForTesting()) {}
+ URLLoaderImplTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::IO),
+ context_(NetworkContext::CreateForTesting()) {}
~URLLoaderImplTest() override {}
void SetUp() override {
@@ -114,7 +117,7 @@ class URLLoaderImplTest : public testing::Test {
NetworkContext* context() { return context_.get(); }
private:
- base::MessageLoopForIO message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
net::EmbeddedTestServer test_server_;
std::unique_ptr<NetworkContext> context_;
};
« no previous file with comments | « no previous file | net/url_request/url_request_context_builder.h » ('j') | net/url_request/url_request_context_builder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698