3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/timeline-test.js"></script>
5 <script src=
"../tracing-test.js"></script>
9 var sessionId
= "4.20";
13 var commonMetadata
= [
15 "args": { "sessionId": sessionId
},
16 "cat": "disabled-by-default-devtools.timeline",
17 "name": "TracingStartedInPage",
24 "args": { "layerTreeId": 17, "sessionId": sessionId
},
25 "cat": "disabled-by-default-devtools.timeline",
26 "name": "SetLayerTreeId",
35 {"name": "Program", "ts": 1000000, "dur": 9999, "ph": "X", args
: {}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
36 {"name": "FunctionCall", "ts": 1000001, "dur": 9998, "ph": "X", args
: {"data":{}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
37 {"name": "ResourceSendRequest", "ts": 1000002, "ph": "I", args
: {"data":{"requestId": 1, "url": "http://example.com", "requestMethod": "GET"}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
38 {"name": "RecalculateStyles", "ts": 1001003, "dur": 997, "ph": "X", args
: {data
: {}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
39 {"name": "Layout", "ts": 1002001, "ph": "B", args
: {beginData
: {}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
40 {"name": "Layout", "ts": 1003000, "ph": "E", args
: {endData
: {}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
42 {"name": "Program", "ts": 2000000, "ph": "B", args
: {}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
43 {"name": "FunctionCall", "ts": 2000001, "ph": "B", args
: {"data":{}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
44 {"name": "ResourceSendRequest", "ts": 2000002, "ph": "I", args
: {"data":{"requestId": 1, "url": "http://example.com", "requestMethod": "GET"}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
45 {"name": "RecalculateStyles", "ts": 2001003, "ph": "B", args
: {beginData
: {}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
46 {"name": "RecalculateStyles", "ts": 2002000, "ph": "E", args
: {}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
47 {"name": "Layout", "ts": 2002101, "ph": "B", args
: {beginData
: {}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
48 {"name": "Layout", "ts": 2003001, "ph": "E", args
: {endData
: {}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
49 {"name": "ParseHTML", "ts": 2004000, "ph": "B", args
: {"beginData": {"url": "http://example.com"}}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
50 {"name": "ParseHTML", "ts": 2004100, "ph": "E", args
: {}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
51 {"name": "FunctionCall", "ts": 2009999, "ph": "E", args
: {}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
52 {"name": "Program", "ts": 2009999, "ph": "E", args
: {}, "tid": mainThread
, "pid": 100, "cat":"disabled-by-default.devtools.timeline"}
55 var tracingTimelineModel
= InspectorTest
.tracingTimelineModel();
56 tracingTimelineModel
.setEventsForTest(commonMetadata
.concat(traceEvents
));
57 var records
= tracingTimelineModel
.records();
58 var topLevelRecordsCount
= 2;
59 InspectorTest
.assertEquals(topLevelRecordsCount
, records
.length
);
60 for (var i
= 0; i
< records
.length
; ++i
) {
61 InspectorTest
.dumpTimelineModelRecord(records
[i
]);
63 InspectorTest
.completeTest();
69 <body onload=
"runTest()">
71 Test trace-specific implementation of timeline model