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

Unified Diff: dbus/object_proxy_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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/object_proxy_unittest.cc
diff --git a/dbus/object_proxy_unittest.cc b/dbus/object_proxy_unittest.cc
index 189ef9074a02da81e727aefae08b4458e44200ab..5e3d3e2e9d1ebb3916703c37f235799bd16baa22 100644
--- a/dbus/object_proxy_unittest.cc
+++ b/dbus/object_proxy_unittest.cc
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "dbus/object_proxy.h"
#include "base/bind.h"
+#include "base/files/file_descriptor_watcher_posix.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "dbus/bus.h"
-#include "dbus/object_proxy.h"
#include "dbus/test_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -15,6 +16,8 @@ namespace {
class ObjectProxyTest : public testing::Test {
protected:
+ ObjectProxyTest() : file_descriptor_watcher_(&message_loop_) {}
+
void SetUp() override {
Bus::Options bus_options;
bus_options.bus_type = Bus::SESSION;
@@ -25,6 +28,10 @@ class ObjectProxyTest : public testing::Test {
void TearDown() override { bus_->ShutdownAndBlock(); }
base::MessageLoopForIO message_loop_;
+
+ // This enables FileDescriptorWatcher, which is required by dbus::Watch.
+ base::FileDescriptorWatcher file_descriptor_watcher_;
+
scoped_refptr<Bus> bus_;
};
« no previous file with comments | « dbus/bus_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698