Commit 4db37b78 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

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

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

This CL was uploaded by git cl split.

TBR=jamesr@chromium.org

Bug: 891670
Change-Id: I4a96de0332e48cde0453e04ec7552e2708a4f8f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787068Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694586}
parent 3d75e88a
...@@ -31,9 +31,8 @@ class ServiceDirectoryTestBase : public testing::Test { ...@@ -31,9 +31,8 @@ class ServiceDirectoryTestBase : public testing::Test {
protected: protected:
const RunLoop::ScopedRunTimeoutForTest run_timeout_; const RunLoop::ScopedRunTimeoutForTest run_timeout_;
base::test::TaskEnvironment task_environment_{ base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY, base::test::SingleThreadTaskEnvironment::MainThreadType::IO};
base::test::TaskEnvironment::MainThreadType::IO};
std::unique_ptr<sys::OutgoingDirectory> outgoing_directory_; std::unique_ptr<sys::OutgoingDirectory> outgoing_directory_;
TestInterfaceImpl test_service_; TestInterfaceImpl test_service_;
......
...@@ -55,9 +55,8 @@ class ServiceProviderImplTest : public testing::Test { ...@@ -55,9 +55,8 @@ class ServiceProviderImplTest : public testing::Test {
} }
protected: protected:
base::test::TaskEnvironment task_environment_{ base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY, base::test::SingleThreadTaskEnvironment::MainThreadType::IO};
base::test::TaskEnvironment::MainThreadType::IO};
TestInterfaceImpl test_service_; TestInterfaceImpl test_service_;
sys::OutgoingDirectory service_directory_; sys::OutgoingDirectory service_directory_;
......
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