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

Unified Diff: base/debug/trace_event_unittest.cc

Issue 9055001: Change code in base (primarily unit tests) to use Sleep(TimeDelta). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Qualify windows Sleep calls to go through PlatformThread. Created 9 years 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/debug/debugger_posix.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_unittest.cc
diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc
index 36a510c445c39441670ccbb64140b13ad980c62a..cb77feecc65b5e3cde1bf16b3964036a228e8fb3 100644
--- a/base/debug/trace_event_unittest.cc
+++ b/base/debug/trace_event_unittest.cc
@@ -629,7 +629,7 @@ TEST_F(TraceEventTestFixture, DataCapturedThreshold) {
// 100+ seconds to avoid flakiness.
TRACE_EVENT_IF_LONGER_THAN0(100000000, "time", "threshold long1");
TRACE_EVENT_IF_LONGER_THAN0(200000000, "time", "threshold long2");
- base::PlatformThread::Sleep(20); // 20000 us
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(20));
}
// Test that a normal nested event remains after it's parent event is dropped.
@@ -654,7 +654,8 @@ TEST_F(TraceEventTestFixture, DataCapturedThreshold) {
TRACE_EVENT_IF_LONGER_THAN0(1000, "time", "3threshold1000");
{
TRACE_EVENT_IF_LONGER_THAN0(100, "time", "3threshold100");
- base::PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(
+ base::TimeDelta::FromMilliseconds(20));
}
}
}
@@ -678,7 +679,8 @@ TEST_F(TraceEventTestFixture, DataCapturedThreshold) {
{
TRACE_EVENT_IF_LONGER_THAN0(200000000, "time",
"4thresholdlong2");
- base::PlatformThread::Sleep(20);
+ base::PlatformThread::Sleep(
+ base::TimeDelta::FromMilliseconds(20));
}
}
}
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698