Commit 8f0814e9 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Backport some tests in /device/bluetooth/bluez 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
/device/bluetooth/bluez.

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

This CL was uploaded by git cl split.

R=mcchou@chromium.org

Bug: 891670
Change-Id: I7aaa1219ecbb2e87d39d7a0920f822a749d4d9b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787102
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695379}
parent fe2dcf02
...@@ -273,7 +273,7 @@ class BluetoothBlueZTest : public testing::Test { ...@@ -273,7 +273,7 @@ class BluetoothBlueZTest : public testing::Test {
} }
protected: protected:
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
bluez::FakeBluetoothAdapterClient* fake_bluetooth_adapter_client_; bluez::FakeBluetoothAdapterClient* fake_bluetooth_adapter_client_;
bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_;
scoped_refptr<BluetoothAdapter> adapter_; scoped_refptr<BluetoothAdapter> adapter_;
......
...@@ -287,7 +287,7 @@ class BluetoothGattBlueZTest : public testing::Test { ...@@ -287,7 +287,7 @@ class BluetoothGattBlueZTest : public testing::Test {
base::RunLoop::QuitCurrentWhenIdleDeprecated(); base::RunLoop::QuitCurrentWhenIdleDeprecated();
} }
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_;
bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_;
bluez::FakeBluetoothGattServiceClient* fake_bluetooth_gatt_service_client_; bluez::FakeBluetoothGattServiceClient* fake_bluetooth_gatt_service_client_;
......
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