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

Unified Diff: content/network/url_loader_unittest.cc

Issue 2951813002: Make URLRequestContextBuilder use base/task_scheduler/ (Closed)
Patch Set: Merge 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 0612ee3dec792cc83387523318b440a24f60a885..e9486c51a76601a63125286d1208e1ebd01d43c3 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 {
@@ -115,7 +118,7 @@ class URLLoaderImplTest : public testing::Test {
void DestroyContext() { context_.reset(); }
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