summaryrefslogtreecommitdiffstats
path: root/base/thread_unittest.cc
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 01:17:02 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 01:17:02 +0000
commit6e683db29d1f0d8c90faf03d37f7a14ad9d55f8d (patch)
tree67070a5e595dd5646b61edc6c2337f793f53dbca /base/thread_unittest.cc
parent4d5e036157b6fa024f0a7e0659c0559bbfc8dfcb (diff)
downloadchromium_src-6e683db29d1f0d8c90faf03d37f7a14ad9d55f8d.zip
chromium_src-6e683db29d1f0d8c90faf03d37f7a14ad9d55f8d.tar.gz
chromium_src-6e683db29d1f0d8c90faf03d37f7a14ad9d55f8d.tar.bz2
Ensure Cocoa sets up its multithreaded environment
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread_unittest.cc')
-rw-r--r--base/thread_unittest.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/base/thread_unittest.cc b/base/thread_unittest.cc
index cad346f..c1971c2 100644
--- a/base/thread_unittest.cc
+++ b/base/thread_unittest.cc
@@ -4,12 +4,15 @@
#include "base/lock.h"
#include "base/message_loop.h"
+#include "base/platform_test.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Thread;
+typedef PlatformTest ThreadTest;
+
namespace {
class ToggleValue : public Task {
@@ -36,7 +39,7 @@ class SleepSome : public Task {
} // namespace
-TEST(ThreadTest, Restart) {
+TEST_F(ThreadTest, Restart) {
Thread a("Restart");
a.Stop();
EXPECT_FALSE(a.message_loop());
@@ -52,7 +55,7 @@ TEST(ThreadTest, Restart) {
EXPECT_FALSE(a.message_loop());
}
-TEST(ThreadTest, StartWithOptions_StackSize) {
+TEST_F(ThreadTest, StartWithOptions_StackSize) {
Thread a("StartWithStackSize");
// Ensure that the thread can work with only 12 kb and still process a
// message.
@@ -73,7 +76,7 @@ TEST(ThreadTest, StartWithOptions_StackSize) {
EXPECT_TRUE(was_invoked);
}
-TEST(ThreadTest, TwoTasks) {
+TEST_F(ThreadTest, TwoTasks) {
bool was_invoked = false;
{
Thread a("TwoTasks");
@@ -89,7 +92,7 @@ TEST(ThreadTest, TwoTasks) {
EXPECT_TRUE(was_invoked);
}
-TEST(ThreadTest, StopSoon) {
+TEST_F(ThreadTest, StopSoon) {
Thread a("StopSoon");
EXPECT_TRUE(a.Start());
EXPECT_TRUE(a.message_loop());
@@ -99,9 +102,8 @@ TEST(ThreadTest, StopSoon) {
EXPECT_FALSE(a.message_loop());
}
-TEST(ThreadTest, ThreadName) {
+TEST_F(ThreadTest, ThreadName) {
Thread a("ThreadName");
EXPECT_TRUE(a.Start());
EXPECT_EQ("ThreadName", a.thread_name());
}
-