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

Unified Diff: base/test/trace_event_analyzer_unittest.cc

Issue 10828326: Fix TraceEventTestFixture flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sharing HighResSleepForTraceTest between tests Created 8 years, 4 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
« base/debug/trace_event_unittest.cc ('K') | « base/debug/trace_event_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/trace_event_analyzer_unittest.cc
diff --git a/base/test/trace_event_analyzer_unittest.cc b/base/test/trace_event_analyzer_unittest.cc
index dd1ce4dd54c6de410149e1b8999939d112076f68..63760a4fada50ff31049ae4a8a9e8d6ded5bc794 100644
--- a/base/test/trace_event_analyzer_unittest.cc
+++ b/base/test/trace_event_analyzer_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/debug/trace_event_unittest.h"
#include "base/test/trace_event_analyzer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -392,7 +393,7 @@ TEST_F(TraceEventAnalyzerTest, Duration) {
{
TRACE_EVENT0("cat2", "name3"); // found by duration query
TRACE_EVENT_INSTANT0("noise", "name4"); // not searched for, just noise
- base::PlatformThread::Sleep(kSleepTime);
+ base::debug::HighResSleepForTraceTest(kSleepTime);
TRACE_EVENT0("cat2", "name5"); // not found (duration too short)
}
}
« base/debug/trace_event_unittest.cc ('K') | « base/debug/trace_event_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698