Commit 309656ca authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

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

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

This CL was uploaded by git cl split.

R=stevenjb@chromium.org

Bug: 891670
Change-Id: I1f1909a3614aa8447654d5bb05f54cb8d7c3863d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786811
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695122}
parent ec103e51
......@@ -158,7 +158,7 @@ class BiodClientTest : public testing::Test {
std::map<std::string, std::unique_ptr<dbus::Response>> pending_method_calls_;
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
// Mock bus and proxy for simulating calls.
scoped_refptr<dbus::MockBus> bus_;
......
......@@ -104,7 +104,7 @@ class CecServiceClientTest : public testing::Test {
}
protected:
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
std::unique_ptr<CecServiceClient> client_;
scoped_refptr<dbus::MockBus> mock_bus_;
scoped_refptr<dbus::MockObjectProxy> mock_proxy_;
......
......@@ -102,7 +102,7 @@ class OobeConfigurationClientTest : public testing::Test {
// The client to be tested.
std::unique_ptr<OobeConfigurationClient> client_;
// A message loop to emulate asynchronous behavior.
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
// The mock bus.
scoped_refptr<dbus::MockBus> mock_bus_;
// The mock object proxy.
......
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