| Index: mojo/public/cpp/system/tests/watcher_unittest.cc
|
| diff --git a/mojo/public/cpp/system/tests/watcher_unittest.cc b/mojo/public/cpp/system/tests/watcher_unittest.cc
|
| index 5cb3ed23b7799571da5820a1d81492791b8267f1..ebeebf6777888a67aeeba7af1b6bf0290cd2d312 100644
|
| --- a/mojo/public/cpp/system/tests/watcher_unittest.cc
|
| +++ b/mojo/public/cpp/system/tests/watcher_unittest.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| +#include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/run_loop.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| @@ -35,16 +36,10 @@ class WatcherTest : public testing::Test {
|
| WatcherTest() {}
|
| ~WatcherTest() override {}
|
|
|
| - void SetUp() override {
|
| - message_loop_.reset(new base::MessageLoop);
|
| - }
|
| -
|
| - void TearDown() override {
|
| - message_loop_.reset();
|
| - }
|
| + private:
|
| + base::MessageLoop message_loop_;
|
|
|
| - protected:
|
| - std::unique_ptr<base::MessageLoop> message_loop_;
|
| + DISALLOW_COPY_AND_ASSIGN(WatcherTest);
|
| };
|
|
|
| TEST_F(WatcherTest, WatchBasic) {
|
| @@ -162,28 +157,6 @@ TEST_F(WatcherTest, CancelOnDestruction) {
|
| run_loop.Run();
|
| }
|
|
|
| -TEST_F(WatcherTest, NotifyOnMessageLoopDestruction) {
|
| - ScopedMessagePipeHandle a, b;
|
| - CreateMessagePipe(nullptr, &a, &b);
|
| -
|
| - bool notified = false;
|
| - Watcher b_watcher;
|
| - EXPECT_EQ(MOJO_RESULT_OK,
|
| - b_watcher.Start(b.get(), MOJO_HANDLE_SIGNAL_READABLE,
|
| - OnReady([&] (MojoResult result) {
|
| - EXPECT_EQ(MOJO_RESULT_ABORTED, result);
|
| - notified = true;
|
| - })));
|
| - EXPECT_TRUE(b_watcher.IsWatching());
|
| -
|
| - message_loop_.reset();
|
| -
|
| - EXPECT_TRUE(notified);
|
| -
|
| - EXPECT_TRUE(b_watcher.IsWatching());
|
| - b_watcher.Cancel();
|
| -}
|
| -
|
| TEST_F(WatcherTest, CloseAndCancel) {
|
| ScopedMessagePipeHandle a, b;
|
| CreateMessagePipe(nullptr, &a, &b);
|
|
|