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

Unified Diff: dbus/bus_unittest.cc

Issue 2808983002: Migrate to base::FileDescriptionWatcher in dbus/bus.cc. (Closed)
Patch Set: self-review Created 3 years, 8 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: dbus/bus_unittest.cc
diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc
index 84bbb783f390a70d40f065173059bf46ce2096ab..6166e893b15ebffec0f9ae94b4dbbd0371d6b0a9 100644
--- a/dbus/bus_unittest.cc
+++ b/dbus/bus_unittest.cc
@@ -5,6 +5,7 @@
#include "dbus/bus.h"
#include "base/bind.h"
+#include "base/files/file_descriptor_watcher_posix.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
@@ -318,9 +319,10 @@ TEST(BusTest, DoubleAddAndRemoveMatch) {
}
TEST(BusTest, ListenForServiceOwnerChange) {
- // Setup the current thread's MessageLoop. Must be of TYPE_IO for the
- // listeners to work.
- base::MessageLoop message_loop(base::MessageLoop::TYPE_IO);
+ // Setup a MessageLoopForIO and enable FileDescriptorWatcher for listeners.
+ base::MessageLoopForIO message_loop;
+ base::FileDescriptorWatcher file_descriptor_watcher(&message_loop);
+
RunLoopWithExpectedCount run_loop_state;
// Create the bus.

Powered by Google App Engine
This is Rietveld 408576698