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 // Multi-threaded tests of ConditionVariable class. | 5 // Multi-threaded tests of ConditionVariable class. |
6 | 6 |
7 #include <time.h> | 7 #include <time.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/condition_variable.h" | 11 #include "base/condition_variable.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/platform_test.h" | |
14 #include "base/platform_thread.h" | 13 #include "base/platform_thread.h" |
15 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
16 #include "base/spin_wait.h" | 15 #include "base/spin_wait.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "testing/platform_test.h" |
18 | 18 |
19 using base::TimeDelta; | 19 using base::TimeDelta; |
20 using base::TimeTicks; | 20 using base::TimeTicks; |
21 | 21 |
22 namespace { | 22 namespace { |
23 //------------------------------------------------------------------------------ | 23 //------------------------------------------------------------------------------ |
24 // Define our test class, with several common variables. | 24 // Define our test class, with several common variables. |
25 //------------------------------------------------------------------------------ | 25 //------------------------------------------------------------------------------ |
26 | 26 |
27 class ConditionVariableTest : public PlatformTest { | 27 class ConditionVariableTest : public PlatformTest { |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 { | 655 { |
656 AutoLock auto_lock(lock_); | 656 AutoLock auto_lock(lock_); |
657 // Send notification that we completed our "work." | 657 // Send notification that we completed our "work." |
658 WorkIsCompleted(thread_id); | 658 WorkIsCompleted(thread_id); |
659 } | 659 } |
660 } | 660 } |
661 } | 661 } |
662 | 662 |
663 } // namespace | 663 } // namespace |
664 | 664 |
OLD | NEW |