Index: chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc |
diff --git a/chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc b/chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc |
index f86c942311dd625619be3cdb9ba3aab3e14ae292..394fabcb4919ebedfba04196e5fe2938fa5fa3e8 100644 |
--- a/chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc |
+++ b/chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc |
@@ -67,7 +67,11 @@ class BluetoothHostPairingNoInputTest : public OobeBaseTest { |
using InputDeviceInfo = device::InputServiceLinux::InputDeviceInfo; |
BluetoothHostPairingNoInputTest() { |
- InputServiceProxy::SetThreadIdForTesting(content::BrowserThread::UI); |
+ task_runner_factory_ = base::Bind([]() -> scoped_refptr<base::TaskRunner> { |
+ return content::BrowserThread::GetTaskRunnerForThread( |
+ content::BrowserThread::UI); |
+ }); |
+ InputServiceProxy::SetTaskRunnerFactoryForTesting(&task_runner_factory_); |
device::InputServiceLinux::SetForTesting( |
base::MakeUnique<device::FakeInputServiceLinux>()); |
@@ -162,6 +166,7 @@ class BluetoothHostPairingNoInputTest : public OobeBaseTest { |
bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_ = nullptr; |
base::MessageLoop message_loop_; |
+ InputServiceProxy::TaskRunnerFactory task_runner_factory_; |
DISALLOW_COPY_AND_ASSIGN(BluetoothHostPairingNoInputTest); |
}; |