Commit 1d646854 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

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

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

This CL was uploaded by git cl split.

Edit: Revert changes in v8_unit_test.h

R=treib@chromium.org

Bug: 891670
Change-Id: I20b5a2f1635c3b515370ea689d2515b4536c9b83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787103
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694669}
parent 61052f59
......@@ -26,7 +26,7 @@ class InternalAuthTest : public ::testing::Test {
void TearDown() override {}
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
std::string long_string_;
};
......
......@@ -77,8 +77,8 @@ class ServiceProcessStateFileManipulationTest : public ::testing::Test {
private:
base::ScopedTempDir temp_dir_;
base::test::TaskEnvironment task_environment_{
base::test::TaskEnvironment::MainThreadType::UI};
base::test::SingleThreadTaskEnvironment task_environment_{
base::test::SingleThreadTaskEnvironment::MainThreadType::UI};
base::RunLoop run_loop_;
base::Thread io_thread_;
base::FilePath executable_path_, bundle_path_;
......
......@@ -232,7 +232,7 @@ MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestReadyFalse) {
MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestShutdown) {
base::PlatformThread::SetName("ServiceProcessStateTestShutdownMainThread");
base::test::TaskEnvironment task_environment;
base::test::SingleThreadTaskEnvironment task_environment;
base::RunLoop run_loop;
base::Thread io_thread_("ServiceProcessStateTestShutdownIOThread");
base::Thread::Options options(base::MessagePumpType::IO, 0);
......
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