| 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/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../http/tests/inspector/timeline-test.js"></script> | 5 <script src="../../http/tests/inspector/timeline-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 testRunner.setDumpConsoleMessages(false); | 8 testRunner.setDumpConsoleMessages(false); |
| 9 | 9 |
| 10 function startStopTimeline() | 10 function startStopTimeline() |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 { | 72 { |
| 73 console.timeStamp("timestamp 0"); | 73 console.timeStamp("timestamp 0"); |
| 74 console.timeline("one"); | 74 console.timeline("one"); |
| 75 console.timeStamp("timestamp 1"); | 75 console.timeStamp("timestamp 1"); |
| 76 console.timeline("two"); | 76 console.timeline("two"); |
| 77 console.timeStamp("timestamp 2"); | 77 console.timeStamp("timestamp 2"); |
| 78 } | 78 } |
| 79 | 79 |
| 80 function test() | 80 function test() |
| 81 { | 81 { |
| 82 var panel = WebInspector.panels.timeline; | 82 var panel = UI.panels.timeline; |
| 83 panel._model._currentTarget = WebInspector.targetManager.mainTarget(); | 83 panel._model._currentTarget = SDK.targetManager.mainTarget(); |
| 84 | 84 |
| 85 InspectorTest.runTestSuite([ | 85 InspectorTest.runTestSuite([ |
| 86 function testStartStopTimeline(next) | 86 function testStartStopTimeline(next) |
| 87 { | 87 { |
| 88 InspectorTest.evaluateWithTimeline("startStopTimeline()", allEventsR
eceived); | 88 InspectorTest.evaluateWithTimeline("startStopTimeline()", allEventsR
eceived); |
| 89 | 89 |
| 90 function allEventsReceived() | 90 function allEventsReceived() |
| 91 { | 91 { |
| 92 printTimelineAndTimestampEvents(); | 92 printTimelineAndTimestampEvents(); |
| 93 next(); | 93 next(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } | 170 } |
| 171 ]); | 171 ]); |
| 172 | 172 |
| 173 function printTimelineAndTimestampEvents() { | 173 function printTimelineAndTimestampEvents() { |
| 174 panel._tracingModel.sortedProcesses().forEach(function(process) | 174 panel._tracingModel.sortedProcesses().forEach(function(process) |
| 175 { | 175 { |
| 176 process.sortedThreads().forEach(function(thread) | 176 process.sortedThreads().forEach(function(thread) |
| 177 { | 177 { |
| 178 thread.events().forEach(function(event) | 178 thread.events().forEach(function(event) |
| 179 { | 179 { |
| 180 if (event.hasCategory(WebInspector.TimelineModel.Category.Con
sole)) | 180 if (event.hasCategory(TimelineModel.TimelineModel.Category.Co
nsole)) |
| 181 InspectorTest.addResult(event.name); | 181 InspectorTest.addResult(event.name); |
| 182 else if (event.name === WebInspector.TimelineModel.RecordType
.TimeStamp) | 182 else if (event.name === TimelineModel.TimelineModel.RecordTyp
e.TimeStamp) |
| 183 InspectorTest.addResult(event.args["data"]["message"]); | 183 InspectorTest.addResult(event.args["data"]["message"]); |
| 184 }); | 184 }); |
| 185 }); | 185 }); |
| 186 }); | 186 }); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| 190 </script> | 190 </script> |
| 191 </head> | 191 </head> |
| 192 | 192 |
| 193 <body onload="runTest()"> | 193 <body onload="runTest()"> |
| 194 <p> | 194 <p> |
| 195 Tests console.timeline and timelineEnd commands. | 195 Tests console.timeline and timelineEnd commands. |
| 196 </p> | 196 </p> |
| 197 | 197 |
| 198 </body> | 198 </body> |
| 199 </html> | 199 </html> |
| OLD | NEW |