| 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() |
| 10 { | 10 { |
| 11 var callback; |
| 12 var promise = new Promise((fulfill) => callback = fulfill); |
| 11 var timerOne = setTimeout("1 + 1", 10); | 13 var timerOne = setTimeout("1 + 1", 10); |
| 12 var timerTwo = setInterval(intervalTimerWork, 20); | 14 var timerTwo = setInterval(intervalTimerWork, 20); |
| 13 var iteration = 0; | 15 var iteration = 0; |
| 16 return promise; |
| 14 | 17 |
| 15 function intervalTimerWork() | 18 function intervalTimerWork() |
| 16 { | 19 { |
| 17 if (++iteration < 2) | 20 if (++iteration < 2) |
| 18 return; | 21 return; |
| 19 clearInterval(timerTwo); | 22 clearInterval(timerTwo); |
| 20 callback(); | 23 callback(); |
| 21 } | 24 } |
| 22 } | 25 } |
| 23 | 26 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 </head> | 64 </head> |
| 62 | 65 |
| 63 <body onload="runTest()"> | 66 <body onload="runTest()"> |
| 64 <p> | 67 <p> |
| 65 Test that checks location resolving mechanics for TimerInstall TimerRemove and F
unctionCall events with scriptId. | 68 Test that checks location resolving mechanics for TimerInstall TimerRemove and F
unctionCall events with scriptId. |
| 66 </p><p> | 69 </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. | 70 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> | 71 </p> |
| 69 </body> | 72 </body> |
| 70 </html> | 73 </html> |
| OLD | NEW |