Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc

Issue 2937253003: cros: Replace BrowserThread::FILE in InputServiceProxy (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698