| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/lock.h" | 5 #include "base/lock.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/thread.h" | 8 #include "base/thread.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "testing/platform_test.h" | 10 #include "testing/platform_test.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 EXPECT_EQ("ThreadName", a.thread_name()); | 131 EXPECT_EQ("ThreadName", a.thread_name()); |
| 132 } | 132 } |
| 133 | 133 |
| 134 // Make sure we can't use a thread between Start() and Init(). | 134 // Make sure we can't use a thread between Start() and Init(). |
| 135 TEST_F(ThreadTest, SleepInsideInit) { | 135 TEST_F(ThreadTest, SleepInsideInit) { |
| 136 SleepInsideInitThread t; | 136 SleepInsideInitThread t; |
| 137 EXPECT_FALSE(t.InitCalled()); | 137 EXPECT_FALSE(t.InitCalled()); |
| 138 t.Start(); | 138 t.Start(); |
| 139 EXPECT_TRUE(t.InitCalled()); | 139 EXPECT_TRUE(t.InitCalled()); |
| 140 } | 140 } |
| 141 | |
| OLD | NEW |