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

Unified Diff: chrome/browser/resources/tracing/trace_event_importer_test.html

Issue 9706010: about:tracing support for TRACE_ASYNC_START/FINISH events. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/resources/tracing/trace_event_importer_test.html
diff --git a/chrome/browser/resources/tracing/trace_event_importer_test.html b/chrome/browser/resources/tracing/trace_event_importer_test.html
index 8086cd94454ebbcdf9f08f90f90e0b85462e40f2..344b5f22721f637c3a6997f49e83bb537001496a 100644
--- a/chrome/browser/resources/tracing/trace_event_importer_test.html
+++ b/chrome/browser/resources/tracing/trace_event_importer_test.html
@@ -559,6 +559,31 @@ function testImportStringWithMissingCloseSquareBracketAndNewline() {
assertEquals(1, m.numProcesses);
}
+function testStartFinishOneSliceOneThread() {
+ var events = [
+ // Time is intentionally out of order.
+ {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'F', id: 72},
+ {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'S', id: 72, args: {foo: "bar"}}
+ ];
+
+ var m = new tracing.TimelineModel(events);
+ var t = m.processes[52].threads[53];
+ assertNotUndefined(t);
+ assertEquals(1, t.asyncSlices.slices.length);
+ assertEquals('a', t.asyncSlices.slices[0].title);
+ assertEquals(72, t.asyncSlices.slices[0].id);
+ assertEquals("bar", t.asyncSlices.slices[0].args.foo);
+ assertEquals(0, t.asyncSlices.slices[0].start);
+ assertAlmostEquals((60 - 24) / 1000, t.asyncSlices.slices[0].duration);
+ assertEquals(t, t.asyncSlices.slices[0].startThread);
+ assertEquals(t, t.asyncSlices.slices[0].endThread);
+}
+//oneslicetwothreads
jbates 2012/03/15 00:17:15 mark these TODO?
+//oneslicetwopids
+//oneslicethatdoesntend
+//missingstart
+//twoslicesoutoforderinfile
+
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698