Chromium Code Reviews| 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> |