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 WebInspector.panels.timeline._captureJSProfileSetting.set(false); | |
25 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | |
26 | |
27 function finish() | |
28 { | |
29 InspectorTest.printTimelineRecordsWithDetails("TimerInstall"); | |
30 InspectorTest.printTimelineRecordsWithDetails("TimerFire"); | |
31 InspectorTest.printTimelineRecordsWithDetails("TimerRemove"); | |
32 InspectorTest.printTimelineRecords("FunctionCall"); | |
33 InspectorTest.printTimelineRecordsWithDetails("EvaluateScript"); | |
34 InspectorTest.completeTest(); | |
35 } | |
36 } | |
37 | |
38 if (!window.testRunner) | |
39 setTimeout(performActions, 2000); | |
40 | |
41 </script> | |
42 </head> | |
43 | |
44 <body onload="runTest()"> | |
45 <p> | |
46 Tests the Timeline events for Timers | |
47 </p> | |
48 </body> | |
49 </html> | |
OLD | NEW |