| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/timeline-test.js"></script> |
| <script> |
| |
| function performActions() |
| { |
| var iframe = document.createElement("iframe"); |
| iframe.src = "resources/timeline-iframe-data.html"; |
| document.body.appendChild(iframe); |
| } |
| |
| function test() |
| { |
| InspectorTest.startTimeline(step1); |
| function step1() |
| { |
| InspectorTest.addConsoleSniffer(step2); |
| InspectorTest.evaluateInPage("performActions()"); |
| } |
| |
| function step2() |
| { |
| InspectorTest.stopTimeline(step3); |
| } |
| |
| function step3() |
| { |
| function format(record) |
| { |
| if (record.type === WebInspector.TimelineModel.RecordType.EvaluateScript) |
| InspectorTest.printTimelineRecordProperties(record); |
| else if (record.type === WebInspector.TimelineModel.RecordType.ParseHTML) { |
| var children = []; |
| for (var i = 0; i < record.children.length; ++i) { |
| if (record.children[i].type !== WebInspector.TimelineModel.RecordType.RecalculateStyles) |
| children.push(record.children[i]); |
| } |
| record.children = children; |
| InspectorTest.dumpTimelineRecord(record); |
| } |
| } |
| InspectorTest.printTimelineRecords(null, format); |
| InspectorTest.completeTest(); |
| } |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| Tests the Timeline API instrumentation of an HTML script tag. |
| </p> |
| |
| </body> |
| </html> |