Index: chrome/browser/chromeos/login/hid_detection_browsertest.cc |
diff --git a/chrome/browser/chromeos/login/hid_detection_browsertest.cc b/chrome/browser/chromeos/login/hid_detection_browsertest.cc |
index 75ad707c775e5ec45dbf0e0c9703627e38d1ed27..e83d9b1793878fa14ce9d35532aa2cd91d8ff0b5 100644 |
--- a/chrome/browser/chromeos/login/hid_detection_browsertest.cc |
+++ b/chrome/browser/chromeos/login/hid_detection_browsertest.cc |
@@ -51,7 +51,11 @@ class HidDetectionTest : public OobeBaseTest { |
typedef device::InputServiceLinux::InputDeviceInfo InputDeviceInfo; |
HidDetectionTest() : weak_ptr_factory_(this) { |
- 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_); |
HidDetectionTest::InitInputService(); |
} |
@@ -100,7 +104,7 @@ class HidDetectionTest : public OobeBaseTest { |
scoped_refptr< |
testing::NiceMock<device::MockBluetoothAdapter> > mock_adapter_; |
- |
+ InputServiceProxy::TaskRunnerFactory task_runner_factory_; |
base::WeakPtrFactory<HidDetectionTest> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(HidDetectionTest); |