| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../timeline-test.js"></script> | 4 <script src="../timeline-test.js"></script> |
| 5 <script src="../network-test.js"></script> | 5 <script src="../network-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function performActions(callback) | 8 function performActions() |
| 9 { | 9 { |
| 10 var callback; |
| 11 var promise = new Promise((fulfill) => callback = fulfill); |
| 10 var script = document.createElement("script"); | 12 var script = document.createElement("script"); |
| 11 script.src = "resources/timeline-script-parse.php"; | 13 script.src = "resources/timeline-script-parse.php"; |
| 12 script.async = true; | 14 script.async = true; |
| 13 script.onload = callback; | 15 script.onload = callback; |
| 14 document.body.appendChild(script); | 16 document.body.appendChild(script); |
| 17 return promise; |
| 15 } | 18 } |
| 16 | 19 |
| 17 function test() | 20 function test() |
| 18 { | 21 { |
| 19 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | 22 InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
| 20 | 23 |
| 21 function finish() | 24 function finish() |
| 22 { | 25 { |
| 23 InspectorTest.printTimelineRecordsWithDetails("v8.parseOnBackground"); | 26 InspectorTest.printTimelineRecordsWithDetails("v8.parseOnBackground"); |
| 24 InspectorTest.completeTest(); | 27 InspectorTest.completeTest(); |
| 25 } | 28 } |
| 26 } | 29 } |
| 27 | 30 |
| 28 </script> | 31 </script> |
| 29 </head> | 32 </head> |
| 30 | 33 |
| 31 <body onload="runTest()"> | 34 <body onload="runTest()"> |
| 32 <p> | 35 <p> |
| 33 Tests the Timeline events for v8.parseOnBackground | 36 Tests the Timeline events for v8.parseOnBackground |
| 34 </p> | 37 </p> |
| 35 | 38 |
| 36 </body> | 39 </body> |
| 37 </html> | 40 </html> |
| OLD | NEW |