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

Unified Diff: device/hid/input_service_linux_unittest.cc

Issue 2383003004: Use FileDescriptorWatcher in DeviceMonitorLinux (Closed)
Patch Set: remove unused include Created 4 years, 2 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
« no previous file with comments | « device/core/device_monitor_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/input_service_linux_unittest.cc
diff --git a/device/hid/input_service_linux_unittest.cc b/device/hid/input_service_linux_unittest.cc
index 8b93cb525618866ba058d4911311caa258afed30..4b65c7f8386f66dfce0962b954895373a80bb9e9 100644
--- a/device/hid/input_service_linux_unittest.cc
+++ b/device/hid/input_service_linux_unittest.cc
@@ -6,7 +6,9 @@
#include <vector>
+#include "base/files/file_descriptor_watcher_posix.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "device/hid/input_service_linux.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,8 +16,13 @@ namespace device {
TEST(InputServiceLinux, Simple) {
base::MessageLoopForIO message_loop;
+ base::FileDescriptorWatcher file_descriptor_watcher(&message_loop);
+
InputServiceLinux* service = InputServiceLinux::GetInstance();
+ // Allow the FileDescriptorWatcher in DeviceMonitorLinux to start watching.
+ base::RunLoop().RunUntilIdle();
+
ASSERT_TRUE(service);
std::vector<InputServiceLinux::InputDeviceInfo> devices;
service->GetDevices(&devices);
« no previous file with comments | « device/core/device_monitor_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698