| 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 var scriptUrl = "timeline-network-resource.js"; | 7 var scriptUrl = "timeline-network-resource.js"; |
| 8 | 8 |
| 9 function performActions(callback) | 9 function performActions() |
| 10 { | 10 { |
| 11 window.timelineNetworkResourceEvaluated = callback; | 11 var promise = new Promise((fulfill) => window.timelineNetworkResourceEvaluat
ed = fulfill); |
| 12 var script = document.createElement("script"); | 12 var script = document.createElement("script"); |
| 13 script.src = scriptUrl; | 13 script.src = scriptUrl; |
| 14 document.body.appendChild(script); | 14 document.body.appendChild(script); |
| 15 return promise; |
| 15 } | 16 } |
| 16 | 17 |
| 17 function test() | 18 function test() |
| 18 { | 19 { |
| 19 var requestId; | 20 var requestId; |
| 20 var scriptUrl = "timeline-network-resource.js"; | 21 var scriptUrl = "timeline-network-resource.js"; |
| 21 | 22 |
| 22 var model = WebInspector.panels.timeline._model; | 23 var model = WebInspector.panels.timeline._model; |
| 23 | 24 |
| 24 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | 25 InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 81 |
| 81 </script> | 82 </script> |
| 82 </head> | 83 </head> |
| 83 | 84 |
| 84 <body onload="runTest()"> | 85 <body onload="runTest()"> |
| 85 <p> | 86 <p> |
| 86 Tests the Timeline API instrumentation of a network resource load | 87 Tests the Timeline API instrumentation of a network resource load |
| 87 </p> | 88 </p> |
| 88 </body> | 89 </body> |
| 89 </html> | 90 </html> |
| OLD | NEW |