| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../http/tests/inspector/timeline-test.js"></script> | |
| 5 <script> | |
| 6 | |
| 7 function performActions(callback) | |
| 8 { | |
| 9 var timerOne = setTimeout("1 + 1", 10); | |
| 10 var timerTwo = setInterval(intervalTimerWork, 20); | |
| 11 var iteration = 0; | |
| 12 | |
| 13 function intervalTimerWork() | |
| 14 { | |
| 15 if (++iteration < 2) | |
| 16 return; | |
| 17 clearInterval(timerTwo); | |
| 18 callback(); | |
| 19 } | |
| 20 } | |
| 21 | |
| 22 function test() | |
| 23 { | |
| 24 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | |
| 25 | |
| 26 function finish() | |
| 27 { | |
| 28 InspectorTest.printTimelineRecords("TimerInstall"); | |
| 29 InspectorTest.printTimelineRecords("TimerFire"); | |
| 30 InspectorTest.printTimelineRecords("TimerRemove"); | |
| 31 InspectorTest.printTimelineRecords("FunctionCall"); | |
| 32 InspectorTest.printTimelineRecords("EvaluateScript"); | |
| 33 InspectorTest.completeTest(); | |
| 34 } | |
| 35 } | |
| 36 | |
| 37 if (!window.testRunner) | |
| 38 setTimeout(performActions, 2000); | |
| 39 | |
| 40 </script> | |
| 41 </head> | |
| 42 | |
| 43 <body onload="runTest()"> | |
| 44 <p> | |
| 45 Tests the Timeline events for Timers | |
| 46 </p> | |
| 47 </body> | |
| 48 </html> | |
| OLD | NEW |