Index: extensions/browser/api/hid/hid_apitest.cc |
diff --git a/extensions/browser/api/hid/hid_apitest.cc b/extensions/browser/api/hid/hid_apitest.cc |
index ad916480be500fdc05917e182d03195fbff91c02..0f70ff7accc83b33abf9db7ea883543e3c681d46 100644 |
--- a/extensions/browser/api/hid/hid_apitest.cc |
+++ b/extensions/browser/api/hid/hid_apitest.cc |
@@ -169,12 +169,16 @@ class HidApiTest : public ShellApiTest { |
public: |
void SetUpOnMainThread() override { |
ShellApiTest::SetUpOnMainThread(); |
+#if defined(OS_WIN) |
+ // TODO(reillyg): Migrate Windows backend from FILE thread to UI thread. |
base::RunLoop run_loop; |
- BrowserThread::PostTaskAndReply(BrowserThread::FILE, |
- FROM_HERE, |
+ BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE, |
base::Bind(&HidApiTest::SetUpService, this), |
run_loop.QuitClosure()); |
run_loop.Run(); |
+#else |
+ SetUpService(); |
+#endif |
} |
void SetUpService() { HidService::SetInstanceForTest(new MockHidService()); } |