| 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 timerOne = setTimeout("1 + 1", 10); | 9 var timerOne = setTimeout("1 + 1", 10); |
| 10 var timerTwo = setInterval(intervalTimerWork, 20); | 10 var timerTwo = setInterval(intervalTimerWork, 20); |
| 11 var iteration = 0; | 11 var iteration = 0; |
| 12 | 12 |
| 13 function intervalTimerWork() | 13 function intervalTimerWork() |
| 14 { | 14 { |
| 15 if (++iteration < 2) | 15 if (++iteration < 2) |
| 16 return; | 16 return; |
| 17 clearInterval(timerTwo); | 17 clearInterval(timerTwo); |
| 18 } | 18 } |
| 19 } | 19 } |
| 20 | 20 |
| 21 function test() | 21 function test() |
| 22 { | 22 { |
| 23 WebInspector.TimelineModel._doNotAssignEndTime = true; | |
| 24 InspectorTest.startTimeline(function() { | 23 InspectorTest.startTimeline(function() { |
| 25 InspectorTest.evaluateInPage("performActions()"); | 24 InspectorTest.evaluateInPage("performActions()"); |
| 26 }); | 25 }); |
| 27 | 26 |
| 28 InspectorTest.waitForRecordType("TimerRemove", finish); | 27 InspectorTest.waitForRecordType("TimerRemove", finish); |
| 29 | 28 |
| 30 function finish() | 29 function finish() |
| 31 { | 30 { |
| 32 InspectorTest.printTimelineRecords("TimerInstall"); | 31 InspectorTest.printTimelineRecords("TimerInstall"); |
| 33 InspectorTest.printTimelineRecords("TimerFire"); | 32 InspectorTest.printTimelineRecords("TimerFire"); |
| 34 InspectorTest.printTimelineRecords("TimerRemove"); | 33 InspectorTest.printTimelineRecords("TimerRemove"); |
| 35 InspectorTest.printTimelineRecords("FunctionCall"); | 34 InspectorTest.printTimelineRecords("FunctionCall"); |
| 36 InspectorTest.printTimelineRecords("EvaluateScript"); | 35 InspectorTest.printTimelineRecords("EvaluateScript"); |
| 37 InspectorTest.completeTest(); | 36 InspectorTest.completeTest(); |
| 38 } | 37 } |
| 39 } | 38 } |
| 40 | 39 |
| 41 if (!window.testRunner) | 40 if (!window.testRunner) |
| 42 setTimeout(performActions, 2000); | 41 setTimeout(performActions, 2000); |
| 43 | 42 |
| 44 </script> | 43 </script> |
| 45 </head> | 44 </head> |
| 46 | 45 |
| 47 <body onload="runTest()"> | 46 <body onload="runTest()"> |
| 48 <p> | 47 <p> |
| 49 Tests the Timeline events for Timers | 48 Tests the Timeline events for Timers |
| 50 </p> | 49 </p> |
| 51 </body> | 50 </body> |
| 52 </html> | 51 </html> |
| OLD | NEW |