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

Unified Diff: base/message_loop_unittest.cc

Issue 14387002: Adding TryPostTask to the message loop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bool Created 7 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
Index: base/message_loop_unittest.cc
diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc
index 5a90a6f5dd465f7eb352b268aaed9b66fb90de91..9233b6e38c356b369e1ff77679da3c4fa7d85234 100644
--- a/base/message_loop_unittest.cc
+++ b/base/message_loop_unittest.cc
@@ -93,8 +93,9 @@ void RunTest_PostTask(MessageLoop::Type message_loop_type) {
&Foo::Test1Int, foo.get(), 100));
MessageLoop::current()->PostTask(FROM_HERE, Bind(
&Foo::Test2Ptr, foo.get(), &a, &c));
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &Foo::Test2Mixed, foo.get(), a, &d));
+
+ EXPECT_TRUE(MessageLoop::current()->TryPostTask(FROM_HERE, Bind(
jar (doing other things) 2013/04/26 21:59:43 You should probably add a test that holds the lock
+ &Foo::Test2Mixed, foo.get(), a, &d)));
// After all tests, post a message that will shut down the message loop
MessageLoop::current()->PostTask(FROM_HERE, Bind(

Powered by Google App Engine
This is Rietveld 408576698