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

Unified Diff: base/debug/trace_event_unittest.cc

Issue 98953002: Configure synthetic delays through TraceLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only use category=value syntax for delays. Created 7 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
« base/debug/trace_event_impl.cc ('K') | « base/debug/trace_event_impl.cc ('k') | no next file » | 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 aef2c43b6faad81700299647b0e79d075465ad9a..96bf3e59f5d0e67c67b0295f1c5a0d6c11d39492 100644
--- a/base/debug/trace_event_unittest.cc
+++ b/base/debug/trace_event_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_synthetic_delay.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/memory/ref_counted_memory.h"
@@ -2582,5 +2583,18 @@ TEST_F(TraceEventTestFixture, TimeOffset) {
}
}
+TEST_F(TraceEventTestFixture, ConfigureSyntheticDelays) {
+ BeginSpecificTrace("test.Delay=0.05");
+
+ base::TimeTicks start = base::TimeTicks::Now();
+ {
+ TRACE_EVENT_SYNTHETIC_DELAY("test.Delay");
+ }
+ base::TimeDelta duration = base::TimeTicks::Now() - start;
+ EXPECT_GE(duration.InMilliseconds(), 50);
+
+ EndTraceAndFlush();
+}
+
} // namespace debug
} // namespace base
« base/debug/trace_event_impl.cc ('K') | « base/debug/trace_event_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698