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

Unified Diff: base/time_win_unittest.cc

Issue 9836125: Fix base::CPU detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix TimeTicks.Drift test Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/cpu_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time_win_unittest.cc
diff --git a/base/time_win_unittest.cc b/base/time_win_unittest.cc
index e3ba09a690764b417976693317521daf8eec412a..f7640073af4d86b037d2926dace51f2868bdbe90 100644
--- a/base/time_win_unittest.cc
+++ b/base/time_win_unittest.cc
@@ -229,7 +229,8 @@ TEST(TimeTicks, Drift) {
// Sanity check. We expect some time drift to occur, especially across
// the number of iterations we do. However, if the QPC is disabled, this
// is not measuring anything (drift is zero in that case).
- EXPECT_LT(0, total_drift);
+ if (TimeTicks::IsHighResClockWorking())
+ EXPECT_LT(0, total_drift);
jar (doing other things) 2012/03/28 18:46:56 This seems like a high-risk flaky test. In additi
printf("average time drift in microseconds: %lld\n",
total_drift / kIterations);
« no previous file with comments | « base/cpu_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698