Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: timelapse
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (46 sloc) 1.337 kb
<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>
Jump to Line
Something went wrong with that request. Please try again.