3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/timeline-test.js"></script>
5 <script type=
"text/javascript">
10 function dumper(record
)
12 InspectorTest
.addResult(record
.type());
15 var sessionId
= "4.20";
21 "args": { "sessionId": sessionId
},
22 "cat": "disabled-by-default-devtools.timeline",
23 "name": "TracingStartedInPage",
29 {"name": "a", "ts": 1000000, "ph": "B", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
30 {"name": "aa", "ts": 1000001, "ph": "B", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
31 {"name": "aaa", "ts": 1200000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
32 {"name": "aab", "ts": 1300000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
33 {"name": "aa", "ts": 1400000, "ph": "E", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
34 {"name": "ab", "ts": 1500001, "ph": "B", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
35 {"name": "aba", "ts": 1600000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
36 {"name": "abb", "ts": 1700000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
37 {"name": "ab", "ts": 1800000, "ph": "E", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
38 {"name": "a", "ts": 2000000, "ph": "E", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
39 {"name": "b", "ts": 3000000, "ph": "B", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
40 {"name": "ba", "ts": 3000001, "ph": "B", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
41 {"name": "baa", "ts": 3200000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
42 {"name": "bab", "ts": 3300000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
43 {"name": "ba", "ts": 3400000, "ph": "E", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
44 {"name": "bb", "ts": 3500001, "ph": "B", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
45 {"name": "bba", "ts": 3600000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
46 {"name": "bbb", "ts": 3700000, "ph": "I", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args":{}},
47 {"name": "bb", "ts": 3800000, "ph": "E", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}},
48 {"name": "b", "ts": 4000000, "ph": "E", "tid": mainThread
, "pid": pid
, "cat":"disabled-by-default.devtools.timeline", "args": {}}
51 // Reset filter to accept all records.
52 InspectorTest
.timelineModel()._eventFilter
= new WebInspector
.TimelineModel
.Filter();
53 InspectorTest
.timelineModel().setEventsForTest(testData
);
55 InspectorTest
.addResult("DFS preorder:");
56 InspectorTest
.timelineModel().forAllRecords(dumper
);
57 InspectorTest
.addResult("");
59 InspectorTest
.addResult("DFS postorder:");
60 InspectorTest
.timelineModel().forAllRecords(null, dumper
);
61 InspectorTest
.completeTest();
66 <body onload=
"runTest()">
67 <p>Tests TimelineModel.forAllRecords function.
</p>