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

Unified Diff: base/thread_unittest.cc

Issue 18546: Implementation of Pipeline and FilterHost interfaces. This is a large change... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « base/thread.cc ('k') | media/base/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/thread_unittest.cc
===================================================================
--- base/thread_unittest.cc (revision 8731)
+++ base/thread_unittest.cc (working copy)
@@ -57,16 +57,22 @@
Thread a("Restart");
a.Stop();
EXPECT_FALSE(a.message_loop());
+ EXPECT_FALSE(a.IsRunning());
EXPECT_TRUE(a.Start());
EXPECT_TRUE(a.message_loop());
+ EXPECT_TRUE(a.IsRunning());
a.Stop();
EXPECT_FALSE(a.message_loop());
+ EXPECT_FALSE(a.IsRunning());
EXPECT_TRUE(a.Start());
EXPECT_TRUE(a.message_loop());
+ EXPECT_TRUE(a.IsRunning());
a.Stop();
EXPECT_FALSE(a.message_loop());
+ EXPECT_FALSE(a.IsRunning());
a.Stop();
EXPECT_FALSE(a.message_loop());
+ EXPECT_FALSE(a.IsRunning());
}
TEST_F(ThreadTest, StartWithOptions_StackSize) {
@@ -77,6 +83,7 @@
options.stack_size = 12*1024;
EXPECT_TRUE(a.StartWithOptions(options));
EXPECT_TRUE(a.message_loop());
+ EXPECT_TRUE(a.IsRunning());
bool was_invoked = false;
a.message_loop()->PostTask(FROM_HERE, new ToggleValue(&was_invoked));
@@ -110,10 +117,12 @@
Thread a("StopSoon");
EXPECT_TRUE(a.Start());
EXPECT_TRUE(a.message_loop());
+ EXPECT_TRUE(a.IsRunning());
a.StopSoon();
a.StopSoon();
a.Stop();
EXPECT_FALSE(a.message_loop());
+ EXPECT_FALSE(a.IsRunning());
}
TEST_F(ThreadTest, ThreadName) {
« no previous file with comments | « base/thread.cc ('k') | media/base/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698