Commit 736b8de3 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Backport some tests in /components/subresource_filter to SingleThreadTaskEnvironment

These tests were previously migrated from single-threaded MessageLoop to
a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
part of crbug.com/891670.

//base OWNERS decided in retrospect that it was better to keep a
single-threaded option for TaskEnvironment and introduced
SingleThreadTaskEnvironment. This CL retrofits that decision for
/components/subresource_filter.

This CL is a no-op if it passes CQ.

This CL was uploaded by git cl split.

R=pkalinnikov@chromium.org

Bug: 891670
Change-Id: I2b50b464bf35451ba478a29b25888b4c4ee97854
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786808
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696026}
parent 4d0f399a
...@@ -77,7 +77,7 @@ class AsyncDocumentSubresourceFilterTest : public ::testing::Test { ...@@ -77,7 +77,7 @@ class AsyncDocumentSubresourceFilterTest : public ::testing::Test {
// Note: ADSF assumes a task runner is associated with the current thread. // Note: ADSF assumes a task runner is associated with the current thread.
// Instantiate a MessageLoop on the current thread and use base::RunLoop to // Instantiate a MessageLoop on the current thread and use base::RunLoop to
// handle the replies ADSF tasks generate. // handle the replies ADSF tasks generate.
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner_ = scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner_ =
new base::TestSimpleTaskRunner; new base::TestSimpleTaskRunner;
......
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