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

Side by Side Diff: base/threading/watchdog_unittest.cc

Issue 6001010: Move platform_thread to base/threading and put in the base namespace. I left ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « base/threading/watchdog.cc ('k') | base/threading/worker_pool_posix.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/threading/watchdog.h" 5 #include "base/threading/watchdog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/platform_thread.h"
9 #include "base/spin_wait.h" 8 #include "base/spin_wait.h"
9 #include "base/threading/platform_thread.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 namespace { 15 namespace {
16 16
17 //------------------------------------------------------------------------------ 17 //------------------------------------------------------------------------------
18 // Provide a derived class to facilitate testing. 18 // Provide a derived class to facilitate testing.
19 19
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Set a time greater than the timeout into the past. 131 // Set a time greater than the timeout into the past.
132 watchdog.ArmSomeTimeDeltaAgo(TimeDelta::FromSeconds(10)); 132 watchdog.ArmSomeTimeDeltaAgo(TimeDelta::FromSeconds(10));
133 // It should almost instantly go off, but certainly in less than 5 minutes. 133 // It should almost instantly go off, but certainly in less than 5 minutes.
134 SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(TimeDelta::FromMinutes(5), 134 SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(TimeDelta::FromMinutes(5),
135 watchdog.alarm_counter() > 0); 135 watchdog.alarm_counter() > 0);
136 136
137 EXPECT_EQ(1, watchdog.alarm_counter()); 137 EXPECT_EQ(1, watchdog.alarm_counter());
138 } 138 }
139 139
140 } // namespace base 140 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/watchdog.cc ('k') | base/threading/worker_pool_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698