Commit 1f64714b authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

[scheduling] Use ScopedTaskEnvironment instead of MessageLoop in web_resource

MessageLoop will go away, eventually.

BUG=891670

Change-Id: I7cb468ba37b76d5765f9941a6101d8115d3f73de
Reviewed-on: https://chromium-review.googlesource.com/c/1352768Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#611715}
parent 40bcc6f0
......@@ -4,8 +4,8 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "components/prefs/testing_pref_service.h"
#include "components/web_resource/eula_accepted_notifier.h"
#include "components/web_resource/resource_request_allowed_notifier_test_util.h"
......@@ -119,7 +119,8 @@ class ResourceRequestAllowedNotifierTest
}
private:
base::MessageLoopForUI message_loop_;
base::test::ScopedTaskEnvironment task_environment_{
base::test::ScopedTaskEnvironment::MainThreadType::UI};
TestRequestAllowedNotifier resource_request_allowed_notifier_;
TestingPrefServiceSimple prefs_;
TestEulaAcceptedNotifier* eula_notifier_; // Weak, owned by RRAN.
......
......@@ -6,7 +6,7 @@
#include <utility>
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/test/scoped_task_environment.h"
#include "base/values.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
......@@ -145,7 +145,7 @@ class WebResourceServiceTest : public testing::Test {
void CallStartFetch() { test_web_resource_service_->StartFetch(); }
private:
base::MessageLoop message_loop_;
base::test::ScopedTaskEnvironment task_environment_;
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
std::unique_ptr<TestingPrefServiceSimple> local_state_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment