3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../tracing-test.js"></script>
8 var sessionId
= "6.23";
15 "name": "process_name",
23 "name": "CrRendererMain"
26 "name": "thread_name",
34 "sessionId": sessionId
,
37 "cat": "disabled-by-default-devtools.timeline",
38 "name": "TracingStartedInPage",
47 "cat": "disabled-by-default-devtools.timeline",
58 "frame": "0x2f7b63884000"
61 "cat": "disabled-by-default-devtools.timeline",
62 "name": "InvalidateLayout",
73 "frame": "0x2f7b63884000",
74 "partialLayout": true,
78 "cat": "disabled-by-default-devtools.timeline",
102 "cat": "disabled-by-default-devtools.timeline",
112 "cat": "disabled-by-default-devtools.timeline",
122 "cat": "disabled-by-default-devtools.timeline",
134 "cat": "disabled-by-default-devtools.timeline",
136 "name": "EventDispatch",
147 "frame": "0x2f7b63884000",
150 "scriptName": "chrome-devtools://devtools/bundled/ui/UIUtils.js"
153 "cat": "disabled-by-default-devtools.timeline",
155 "name": "FunctionCall",
166 "frame": "0x2f7b63884000",
169 "scriptName": "chrome-devtools://devtools/bundled/ui/UIUtils.js"
172 "cat": "disabled-by-default-devtools.timeline",
174 "name": "FunctionCall",
184 "cat": "disabled-by-default-devtools.timeline",
197 "cat": "disabled-by-default-devtools.timeline",
198 "name": "CommitLoad",
207 "cat": "webkit.console",
216 "cat": "disabled-by-default-devtools.timeline",
226 "cat": "disabled-by-default-devtools.timeline",
235 "cat": "disabled-by-default-devtools.timeline",
244 "cat": "webkit.console",
253 "cat": "disabled-by-default-devtools.timeline",
266 functionName
: "(root)",
283 timestamps
: [421000, 422000, 423000, 424000, 425000, 426000, 427000, 428000, 429000],
284 samples
: [2, 2, 3, 3, 3, 4, 4, 2, 2 ]
287 var tracingTimelineModel
= InspectorTest
.tracingTimelineModel();
288 tracingTimelineModel
._addCpuProfile(WebInspector
.targetManager
.mainTarget().id(), cpuProfile
);
289 tracingTimelineModel
.setEventsForTest(rawTraceEvents
);
290 var events
= tracingTimelineModel
.inspectedTargetEvents();
291 InspectorTest
.assertEquals(24, events
.length
);
292 events
.forEach(function(e
) {
293 InspectorTest
.addResult(e
.name
+ ": " + e
.startTime
+ " " + (e
.selfTime
|| 0).toFixed(2) + "/" + (e
.duration
|| 0).toFixed(2));
295 InspectorTest
.completeTest();
300 <body onload=
"runTest()">