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

Unified Diff: chrome/browser/chromeos/login/hid_detection_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/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);

Powered by Google App Engine
This is Rietveld 408576698