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

Unified Diff: mojo/public/utility/run_loop_unittest.cc

Issue 126883002: Make RunLoop remove handle when a timeout is notified (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add const to HasHandler() Created 6 years, 11 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 | « mojo/public/utility/run_loop.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/utility/run_loop_unittest.cc
diff --git a/mojo/public/utility/run_loop_unittest.cc b/mojo/public/utility/run_loop_unittest.cc
index 0c0762d46588352a8b64189d0b90b3bdf6dc3c33..2ca8c3ee83abde1f19a9f487466ebafa67567442 100644
--- a/mojo/public/utility/run_loop_unittest.cc
+++ b/mojo/public/utility/run_loop_unittest.cc
@@ -105,6 +105,7 @@ TEST_F(RunLoopTest, HandleReady) {
run_loop.Run();
EXPECT_EQ(1, handler.ready_count());
EXPECT_EQ(0, handler.error_count());
+ EXPECT_FALSE(run_loop.HasHandler(test_pipe.handle0.get()));
}
class QuitOnReadyRunLoopHandler : public TestRunLoopHandler {
@@ -140,6 +141,7 @@ TEST_F(RunLoopTest, QuitFromReady) {
run_loop.Run();
EXPECT_EQ(1, handler.ready_count());
EXPECT_EQ(0, handler.error_count());
+ EXPECT_TRUE(run_loop.HasHandler(test_pipe.handle0.get()));
}
class QuitOnErrorRunLoopHandler : public TestRunLoopHandler {
@@ -175,6 +177,7 @@ TEST_F(RunLoopTest, QuitWhenDeadlineExpired) {
EXPECT_EQ(0, handler.ready_count());
EXPECT_EQ(1, handler.error_count());
EXPECT_EQ(MOJO_RESULT_DEADLINE_EXCEEDED, handler.last_error_result());
+ EXPECT_FALSE(run_loop.HasHandler(test_pipe.handle0.get()));
}
TEST_F(RunLoopTest, Current) {
« no previous file with comments | « mojo/public/utility/run_loop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698