| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/task.h" | 5 #include "base/task.h" |
| 6 #include "base/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
| 7 #include "base/threading/worker_pool.h" | 7 #include "base/threading/worker_pool.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "testing/platform_test.h" | 9 #include "testing/platform_test.h" |
| 10 | 10 |
| 11 typedef PlatformTest WorkerPoolTest; | 11 typedef PlatformTest WorkerPoolTest; |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 37 WorkerPool::PostTask(FROM_HERE, new PostTaskTestTask(&test_event), false); | 37 WorkerPool::PostTask(FROM_HERE, new PostTaskTestTask(&test_event), false); |
| 38 WorkerPool::PostTask(FROM_HERE, new PostTaskTestTask(&long_test_event), true); | 38 WorkerPool::PostTask(FROM_HERE, new PostTaskTestTask(&long_test_event), true); |
| 39 | 39 |
| 40 signaled = test_event.Wait(); | 40 signaled = test_event.Wait(); |
| 41 EXPECT_TRUE(signaled); | 41 EXPECT_TRUE(signaled); |
| 42 signaled = long_test_event.Wait(); | 42 signaled = long_test_event.Wait(); |
| 43 EXPECT_TRUE(signaled); | 43 EXPECT_TRUE(signaled); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace base | 46 } // namespace base |
| OLD | NEW |