forked from burg/timelapse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timeline-dfs.html
52 lines (46 loc) · 1.31 KB
/
timeline-dfs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<head>
<script src="../http/tests/inspector/inspector-test.js"></script>
<script type="text/javascript">
var test = function()
{
WebInspector.showPanel("timeline");
function dumper(record)
{
InspectorTest.addResult(record.name);
}
var records = [
{"name" : "a", "children" : [
{"name" : "aa", "children": [
{"name" : "aaa"},
{"name" : "aab"},
]},
{"name" : "ab", "children":[
{"name" : "aba"},
{"name" : "abb"},
]}
]},
{"name" : "b", "children" : [
{"name" : "ba", "children" : [
{"name" : "baa"},
{"name" : "bab"},
]},
{"name" : "bb", "children":[
{"name" : "bba"},
{"name" : "bbb"},
]}
]},
];
InspectorTest.addResult("DFS preorder:");
WebInspector.TimelinePresentationModel.forAllRecords(records, dumper);
InspectorTest.addResult("");
InspectorTest.addResult("DFS postorder:");
WebInspector.TimelinePresentationModel.forAllRecords(records, null, dumper);
InspectorTest.completeTest();
}
</script>
</head>
<body onload="runTest()">
<p>Tests TimelinePresentationModel.forAllRecords function.</p>
</body>
</html>