| 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 test() | 7 function test() |
| 8 { | 8 { |
| 9 function performActions() | 9 function performActions() |
| 10 { | 10 { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 var source = performActions.toString(); | 27 var source = performActions.toString(); |
| 28 source += "\n//# sourceURL=performActions.js"; | 28 source += "\n//# sourceURL=performActions.js"; |
| 29 InspectorTest.evaluateInPage(source, startTimeline); | 29 InspectorTest.evaluateInPage(source, startTimeline); |
| 30 | 30 |
| 31 function startTimeline() | 31 function startTimeline() |
| 32 { | 32 { |
| 33 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | 33 InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
| 34 } | 34 } |
| 35 | 35 |
| 36 var linkifier = new WebInspector.Linkifier(); | 36 var linkifier = new Components.Linkifier(); |
| 37 | 37 |
| 38 var recordTypes = new Set(["TimerInstall", "TimerRemove", "FunctionCall"]); | 38 var recordTypes = new Set(["TimerInstall", "TimerRemove", "FunctionCall"]); |
| 39 function formatter(event) | 39 function formatter(event) |
| 40 { | 40 { |
| 41 if (!recordTypes.has(event.name)) | 41 if (!recordTypes.has(event.name)) |
| 42 return; | 42 return; |
| 43 | 43 |
| 44 var detailsText = WebInspector.TimelineUIUtils.buildDetailsTextForTraceE
vent(event, InspectorTest.timelineModel().targetByEvent(event)); | 44 var detailsText = Timeline.TimelineUIUtils.buildDetailsTextForTraceEvent
(event, InspectorTest.timelineModel().targetByEvent(event)); |
| 45 InspectorTest.addResult("detailsTextContent for " + event.name + " event
: '" + detailsText + "'"); | 45 InspectorTest.addResult("detailsTextContent for " + event.name + " event
: '" + detailsText + "'"); |
| 46 | 46 |
| 47 var details = WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent
(event, InspectorTest.timelineModel().targetByEvent(event), linkifier); | 47 var details = Timeline.TimelineUIUtils.buildDetailsNodeForTraceEvent(eve
nt, InspectorTest.timelineModel().targetByEvent(event), linkifier); |
| 48 if (!details) | 48 if (!details) |
| 49 return; | 49 return; |
| 50 InspectorTest.addResult("details.textContent for " + event.name + " even
t: '" + details.textContent.replace(/VM[\d]+/, "VM") + "'"); | 50 InspectorTest.addResult("details.textContent for " + event.name + " even
t: '" + details.textContent.replace(/VM[\d]+/, "VM") + "'"); |
| 51 } | 51 } |
| 52 | 52 |
| 53 function finish() | 53 function finish() |
| 54 { | 54 { |
| 55 InspectorTest.walkTimelineEventTree(formatter); | 55 InspectorTest.walkTimelineEventTree(formatter); |
| 56 InspectorTest.completeTest(); | 56 InspectorTest.completeTest(); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 if (!window.testRunner) | 60 if (!window.testRunner) |
| 61 setTimeout(performActions, 2000); | 61 setTimeout(performActions, 2000); |
| 62 | 62 |
| 63 </script> | 63 </script> |
| 64 </head> | 64 </head> |
| 65 | 65 |
| 66 <body onload="runTest()"> | 66 <body onload="runTest()"> |
| 67 <p> | 67 <p> |
| 68 Test that checks location resolving mechanics for TimerInstall TimerRemove and F
unctionCall events with scriptId. | 68 Test that checks location resolving mechanics for TimerInstall TimerRemove and F
unctionCall events with scriptId. |
| 69 </p><p> | 69 </p><p> |
| 70 It expects two FunctionCall for InjectedScript, two TimerInstall events, two Fun
ctionCall events and one TimerRemove event to be logged with performActions.js s
cript name and some line number. | 70 It expects two FunctionCall for InjectedScript, two TimerInstall events, two Fun
ctionCall events and one TimerRemove event to be logged with performActions.js s
cript name and some line number. |
| 71 </p> | 71 </p> |
| 72 </body> | 72 </body> |
| 73 </html> | 73 </html> |
| OLD | NEW |