Index: mojo/common/handle_watcher_unittest.cc |
diff --git a/mojo/common/handle_watcher_unittest.cc b/mojo/common/handle_watcher_unittest.cc |
index 3e879d28868b4e89cf3b5421a49a2544a169d30b..46d2a27c56232453b3a035ed6b122df0590f38cc 100644 |
--- a/mojo/common/handle_watcher_unittest.cc |
+++ b/mojo/common/handle_watcher_unittest.cc |
@@ -280,6 +280,22 @@ TEST_P(HandleWatcherTest, Restart) { |
EXPECT_FALSE(callback_helper2.got_callback()); |
} |
+// Verifies Start() invoked a second time on the same handle works. |
+TEST_P(HandleWatcherTest, RestartOnSameHandle) { |
+ MessagePipe test_pipe; |
+ CallbackHelper callback_helper; |
+ ASSERT_TRUE(test_pipe.handle0.is_valid()); |
+ |
+ HandleWatcher watcher; |
+ callback_helper.Start(&watcher, test_pipe.handle0.get()); |
+ RunUntilIdle(); |
+ EXPECT_FALSE(callback_helper.got_callback()); |
+ |
+ callback_helper.Start(&watcher, test_pipe.handle0.get()); |
+ RunUntilIdle(); |
+ EXPECT_FALSE(callback_helper.got_callback()); |
+} |
+ |
// Verifies deadline is honored. |
TEST_P(HandleWatcherTest, Deadline) { |
InstallTickClock(); |