Commit bc7477c8 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

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

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

This CL was uploaded by git cl split.

R=tbarzic@chromium.org

Bug: 891670
Change-Id: Iac09961da9bc2842611f378e2098e4f905d60744
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786740
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694556}
parent 5018f052
...@@ -120,7 +120,7 @@ class ModemMessagingClientTest : public testing::Test { ...@@ -120,7 +120,7 @@ class ModemMessagingClientTest : public testing::Test {
protected: protected:
ModemMessagingClient* client_ = nullptr; // Unowned convenience pointer. ModemMessagingClient* client_ = nullptr; // Unowned convenience pointer.
// A message loop to emulate asynchronous behavior. // A message loop to emulate asynchronous behavior.
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
// The mock bus. // The mock bus.
scoped_refptr<dbus::MockBus> mock_bus_; scoped_refptr<dbus::MockBus> mock_bus_;
// The mock object proxy. // The mock object proxy.
......
...@@ -173,7 +173,7 @@ class ShillClientUnittestBase : public testing::Test { ...@@ -173,7 +173,7 @@ class ShillClientUnittestBase : public testing::Test {
const base::DictionaryValue& result); const base::DictionaryValue& result);
// A message loop to emulate asynchronous behavior. // A message loop to emulate asynchronous behavior.
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
// The mock bus. // The mock bus.
scoped_refptr<dbus::MockBus> mock_bus_; scoped_refptr<dbus::MockBus> mock_bus_;
......
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