| <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> |