| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function performActions() | 7 function performActions() |
| 8 { | 8 { |
| 9 var iframe = document.createElement("iframe"); | 9 var iframe = document.createElement("iframe"); |
| 10 iframe.src = "resources/timeline-iframe-data.html"; | 10 iframe.src = "resources/timeline-iframe-data.html"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 function step2() | 23 function step2() |
| 24 { | 24 { |
| 25 InspectorTest.stopTimeline(step3); | 25 InspectorTest.stopTimeline(step3); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function step3() | 28 function step3() |
| 29 { | 29 { |
| 30 function format(record) | 30 function format(record) |
| 31 { | 31 { |
| 32 if (record.type === WebInspector.TimelineModel.RecordType.EvaluateSc
ript) | 32 if (record.type() === WebInspector.TimelineModel.RecordType.Evaluate
Script) |
| 33 InspectorTest.printTimelineRecordProperties(record); | 33 InspectorTest.printTimelineRecordProperties(record); |
| 34 else if (record.type === WebInspector.TimelineModel.RecordType.Parse
HTML) { | 34 else if (record.type() === WebInspector.TimelineModel.RecordType.Par
seHTML) { |
| 35 var children = []; | 35 var children = []; |
| 36 var skipCategories = { rendering: true, painting: true }; | 36 var skipCategories = { rendering: true, painting: true }; |
| 37 for (var i = 0; i < record.children.length; ++i) { | 37 for (var i = 0; i < record.children().length; ++i) { |
| 38 var modelRecord = new WebInspector.TimelineModel.RecordImpl(
WebInspector.panels.timeline._model, record.children[i], null); | 38 var modelRecord = new WebInspector.TimelineModel.RecordImpl(
WebInspector.panels.timeline._model, record.children()[i], null); |
| 39 var uiUtils = WebInspector.panels.timeline._uiUtils; | 39 var uiUtils = WebInspector.panels.timeline._uiUtils; |
| 40 if (!skipCategories[uiUtils.categoryForRecord(modelRecord).n
ame]) | 40 if (!skipCategories[uiUtils.categoryForRecord(modelRecord).n
ame]) |
| 41 children.push(record.children[i]); | 41 children.push(record.children()[i]); |
| 42 } | 42 } |
| 43 record.children = children; | 43 record._children = children; |
| 44 InspectorTest.dumpTimelineRecord(record, undefined, undefined, [ | 44 InspectorTest.dumpTimelineRecord(record, undefined, undefined, [ |
| 45 "ParseHTML", | 45 "ParseHTML", |
| 46 "EvaluateScript", | 46 "EvaluateScript", |
| 47 "EventDispatch", | 47 "EventDispatch", |
| 48 "FunctionCall", | 48 "FunctionCall", |
| 49 "TimeStamp", | 49 "TimeStamp", |
| 50 "MarkLoad", | 50 "MarkLoad", |
| 51 "MarkDOMContent" | 51 "MarkDOMContent" |
| 52 ]); | 52 ]); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 InspectorTest.printTimelineRecords(null, format); | 55 InspectorTest.printTimelineRecords(null, format); |
| 56 InspectorTest.completeTest(); | 56 InspectorTest.completeTest(); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 </script> | 60 </script> |
| 61 </head> | 61 </head> |
| 62 | 62 |
| 63 <body onload="runTest()"> | 63 <body onload="runTest()"> |
| 64 <p> | 64 <p> |
| 65 Tests the Timeline API instrumentation of an HTML script tag. | 65 Tests the Timeline API instrumentation of an HTML script tag. |
| 66 </p> | 66 </p> |
| 67 | 67 |
| 68 </body> | 68 </body> |
| 69 </html> | 69 </html> |
| OLD | NEW |