3 <script src=
"../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"tracing-test.js"></script>
9 InspectorTest
.invokeWithTracing("(function(callback) { callback(); })", processTracingEvents
);
11 function processTracingEvents()
13 InspectorTest
.tracingModel().sortedProcesses().forEach(function(process
) {
14 process
.sortedThreads().forEach(function(thread
) {
15 thread
.events().forEach(processEvent
);
18 InspectorTest
.completeTest();
21 function processEvent(event
)
23 var metadataEvents
= [
24 WebInspector
.TimelineModel
.RecordType
.SetLayerTreeId
,
25 WebInspector
.TimelineModel
.RecordType
.TracingStartedInPage
28 if (!event
.hasCategory(WebInspector
.TracingModel
.DevToolsMetadataEventCategory
) || metadataEvents
.indexOf(event
.name
) < 0)
31 InspectorTest
.assertEquals(InspectorTest
.tracingTimelineModel().sessionId(), event
.args
["data"]["sessionId"]);
32 InspectorTest
.addResult("Got DevTools metadata event: " + event
.name
);
37 <body onload=
"runTestAfterDisplay()">
38 <p style=
"transform: translateZ(10px)"> <!-- Force compositing so we have SetLayerTreeHostId event as well -->
39 Tests that Tracing agent returns a session id upon a start that is matching one issued in trace events.