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

Side by Side Diff: base/condition_variable_unittest.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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" 13 #include "base/platform_test.h"
14 #include "base/platform_thread.h" 14 #include "base/platform_thread.h"
15 #include "base/scoped_ptr.h" 15 #include "base/scoped_ptr.h"
16 #include "base/spin_wait.h" 16 #include "base/spin_wait.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 using base::TimeDelta;
20 using base::TimeTicks;
21
19 namespace { 22 namespace {
20 //------------------------------------------------------------------------------ 23 //------------------------------------------------------------------------------
21 // Define our test class, with several common variables. 24 // Define our test class, with several common variables.
22 //------------------------------------------------------------------------------ 25 //------------------------------------------------------------------------------
23 26
24 class ConditionVariableTest : public PlatformTest { 27 class ConditionVariableTest : public PlatformTest {
25 public: 28 public:
26 const TimeDelta kZeroMs; 29 const TimeDelta kZeroMs;
27 const TimeDelta kTenMs; 30 const TimeDelta kTenMs;
28 const TimeDelta kThirtyMs; 31 const TimeDelta kThirtyMs;
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 { 655 {
653 AutoLock auto_lock(lock_); 656 AutoLock auto_lock(lock_);
654 // Send notification that we completed our "work." 657 // Send notification that we completed our "work."
655 WorkIsCompleted(thread_id); 658 WorkIsCompleted(thread_id);
656 } 659 }
657 } 660 }
658 } 661 }
659 662
660 } // namespace 663 } // namespace
661 664
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698