Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / timeline-dfs.html
1 <html>
2 <head>
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">
6
7 var test = function()
8 {
9     WebInspector.inspectorView.showPanel("timeline");
10
11     function dumper(record)
12     {
13         InspectorTest.addResult(record.type);
14     }
15
16     var records = [
17         {"type" : "a", "children" : [
18             {"type" : "aa", "children": [
19                 {"type" : "aaa"},
20                 {"type" : "aab"},
21             ]},
22             {"type" : "ab", "children":[
23                 {"type" : "aba"},
24                 {"type" : "abb"},
25             ]}
26         ]},
27         {"type" : "b", "children" : [
28             {"type" : "ba", "children" : [
29                 {"type" : "baa"},
30                 {"type" : "bab"},
31             ]},
32             {"type" : "bb", "children":[
33                 {"type" : "bba"},
34                 {"type" : "bbb"},
35             ]}
36         ]},
37     ];
38
39     InspectorTest.loadTimelineRecords(records);
40     InspectorTest.addResult("DFS preorder:");
41     InspectorTest.timelineModel().forAllRecords(dumper);
42     InspectorTest.addResult("");
43
44     InspectorTest.addResult("DFS postorder:");
45     InspectorTest.timelineModel().forAllRecords(null, dumper);
46     InspectorTest.completeTest();
47 }
48
49 </script>
50 </head>
51 <body onload="runTest()">
52 <p>Tests TimelineModel.forAllRecords function.</p>
53 </body>
54 </html>