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

Unified Diff: dbus/bus_unittest.cc

Issue 2808983002: Migrate to base::FileDescriptionWatcher in dbus/bus.cc. (Closed)
Patch Set: CR-satorux1-48-update-comment 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
« no previous file with comments | « dbus/bus.cc ('k') | dbus/object_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus_unittest.cc
diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc
index 84bbb783f390a70d40f065173059bf46ce2096ab..71101e696823691a1eaf5136462b3122dc7cbc04 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,11 @@ 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);
+ base::MessageLoopForIO message_loop;
+
+ // This enables FileDescriptorWatcher, which is required by dbus::Watch.
+ base::FileDescriptorWatcher file_descriptor_watcher(&message_loop);
+
RunLoopWithExpectedCount run_loop_state;
// Create the bus.
« no previous file with comments | « dbus/bus.cc ('k') | dbus/object_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698