Commit 959a45fb authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Backport some tests in /services/data_decoder 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
/services/data_decoder.

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

This CL was uploaded by git cl split.

R=rsesek@chromium.org

Bug: 891670
Change-Id: I661e8c04cf53a354ead7ff808eb2636f8a2248ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786970
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693745}
parent 7f373c00
......@@ -108,7 +108,7 @@ class ImageDecoderImplTest : public testing::Test {
ImageDecoderImpl* decoder() { return &decoder_; }
private:
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
ImageDecoderImpl decoder_;
};
......
......@@ -46,7 +46,7 @@ class JsonSanitizerTest : public ::testing::Test {
void OnSuccess(const std::string& json);
void OnError(const std::string& error);
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
#if !defined(OS_ANDROID)
TestingJsonParser::ScopedFactoryOverride factory_override_;
......
......@@ -56,7 +56,7 @@ class TestingJsonParserTest : public testing::Test {
EXPECT_FALSE(error.empty());
}
base::test::TaskEnvironment task_environment;
base::test::SingleThreadTaskEnvironment task_environment;
TestingJsonParser::ScopedFactoryOverride factory_override_;
bool did_success_ = false;
bool did_error_ = false;
......
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