diff options
author | Tianjie <xunchang@google.com> | 2020-06-24 23:10:49 -0700 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2020-07-23 18:27:50 +0000 |
commit | 934b847620e664159f3952eeb3d48c3510a43676 (patch) | |
tree | 933ddf4253b78646ddadf8e061e076d436a4210d /common/subprocess_unittest.cc | |
parent | ebd5e25c24c787f33a1377d7b5c6d8f6a3bbbd01 (diff) |
Update UE to remove MessageLoop::current()->WatchFileDescriptor.
MessageLoop::current()->WatchFileDescriptor is deprecated. And UE should
remove usages of it.
Test: mma && unittest
Change-Id: Ib1ef2e6b6a38ad2a8d07b78bcd72fdb3b7f82226
Diffstat (limited to 'common/subprocess_unittest.cc')
-rw-r--r-- | common/subprocess_unittest.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/common/subprocess_unittest.cc b/common/subprocess_unittest.cc index bc52b83e..e71d3d81 100644 --- a/common/subprocess_unittest.cc +++ b/common/subprocess_unittest.cc @@ -74,9 +74,7 @@ class SubprocessTest : public ::testing::Test { brillo::BaseMessageLoop loop_{&base_loop_}; brillo::AsynchronousSignalHandler async_signal_handler_; Subprocess subprocess_; -#ifndef __ANDROID__ unique_ptr<base::FileDescriptorWatcher::Controller> watcher_; -#endif // __ANDROID__ }; @@ -261,23 +259,6 @@ TEST_F(SubprocessTest, CancelTest) { int fifo_fd = HANDLE_EINTR(open(fifo_path.c_str(), O_RDONLY)); EXPECT_GE(fifo_fd, 0); -#ifdef __ANDROID__ - loop_.WatchFileDescriptor(FROM_HERE, - fifo_fd, - MessageLoop::WatchMode::kWatchRead, - false, - base::Bind( - [](int fifo_fd, uint32_t tag) { - char c; - EXPECT_EQ(1, - HANDLE_EINTR(read(fifo_fd, &c, 1))); - EXPECT_EQ('X', c); - LOG(INFO) << "Killing tag " << tag; - Subprocess::Get().KillExec(tag); - }, - fifo_fd, - tag)); -#else watcher_ = base::FileDescriptorWatcher::WatchReadable( fifo_fd, base::Bind( @@ -295,7 +276,6 @@ TEST_F(SubprocessTest, CancelTest) { base::Unretained(&watcher_), fifo_fd, tag)); -#endif // __ANDROID__ // This test would leak a callback that runs when the child process exits // unless we wait for it to run. |