| 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(callback) | 9 function performActions(callback) |
| 10 { | 10 { |
| 11 var timerOne = setTimeout("1 + 1", 10); | 11 var timerOne = setTimeout("1 + 1", 10); |
| 12 var timerTwo = setInterval(intervalTimerWork, 20); | 12 var timerTwo = setInterval(intervalTimerWork, 20); |
| 13 var iteration = 0; | 13 var iteration = 0; |
| 14 | 14 |
| 15 function intervalTimerWork() | 15 function intervalTimerWork() |
| 16 { | 16 { |
| 17 if (++iteration < 2) | 17 if (++iteration < 2) |
| 18 return; | 18 return; |
| 19 clearInterval(timerTwo); | 19 clearInterval(timerTwo); |
| 20 callback(); | 20 callback(); |
| 21 } | 21 } |
| 22 } | 22 } |
| 23 | 23 |
| 24 var source = performActions.toString(); | 24 var source = performActions.toString(); |
| 25 source += "\n//@ sourceURL=performActions.js"; | 25 source += "\n//# sourceURL=performActions.js"; |
| 26 InspectorTest.evaluateInPage(source, startTimeline); | 26 InspectorTest.evaluateInPage(source, startTimeline); |
| 27 | 27 |
| 28 function startTimeline() | 28 function startTimeline() |
| 29 { | 29 { |
| 30 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | 30 InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
| 31 } | 31 } |
| 32 | 32 |
| 33 var linkifier = new WebInspector.Linkifier(); | 33 var linkifier = new WebInspector.Linkifier(); |
| 34 | 34 |
| 35 var recordTypes = ["TimerInstall", "TimerRemove", "FunctionCall"]; | 35 var recordTypes = ["TimerInstall", "TimerRemove", "FunctionCall"]; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 61 </head> | 61 </head> |
| 62 | 62 |
| 63 <body onload="runTest()"> | 63 <body onload="runTest()"> |
| 64 <p> | 64 <p> |
| 65 Test that checks location resolving mechanics for TimerInstall TimerRemove and F
unctionCall events with scriptId. | 65 Test that checks location resolving mechanics for TimerInstall TimerRemove and F
unctionCall events with scriptId. |
| 66 </p><p> | 66 </p><p> |
| 67 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. | 67 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. |
| 68 </p> | 68 </p> |
| 69 </body> | 69 </body> |
| 70 </html> | 70 </html> |
| OLD | NEW |