OLD | NEW |
| (Empty) |
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 | |
10 function dumper(record) | |
11 { | |
12 InspectorTest.addResult(record.type()); | |
13 } | |
14 | |
15 var records = [ | |
16 {"type" : "a", "children" : [ | |
17 {"type" : "aa", "children": [ | |
18 {"type" : "aaa"}, | |
19 {"type" : "aab"}, | |
20 ]}, | |
21 {"type" : "ab", "children":[ | |
22 {"type" : "aba"}, | |
23 {"type" : "abb"}, | |
24 ]} | |
25 ]}, | |
26 {"type" : "b", "children" : [ | |
27 {"type" : "ba", "children" : [ | |
28 {"type" : "baa"}, | |
29 {"type" : "bab"}, | |
30 ]}, | |
31 {"type" : "bb", "children":[ | |
32 {"type" : "bba"}, | |
33 {"type" : "bbb"}, | |
34 ]} | |
35 ]}, | |
36 ]; | |
37 | |
38 InspectorTest.loadTimelineRecords(records); | |
39 InspectorTest.addResult("DFS preorder:"); | |
40 InspectorTest.timelineModel().forAllRecords(dumper); | |
41 InspectorTest.addResult(""); | |
42 | |
43 InspectorTest.addResult("DFS postorder:"); | |
44 InspectorTest.timelineModel().forAllRecords(null, dumper); | |
45 InspectorTest.completeTest(); | |
46 } | |
47 | |
48 </script> | |
49 </head> | |
50 <body onload="runTest()"> | |
51 <p>Tests TimelineModel.forAllRecords function.</p> | |
52 </body> | |
53 </html> | |
OLD | NEW |