| 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 performActions(callback) | 7 function performActions(callback) |
| 8 { | 8 { |
| 9 function onRequestFinished() | 9 function onRequestFinished() |
| 10 { | 10 { |
| 11 if (!--requestsPending) | 11 if (!--requestsPending) |
| 12 callback(); | 12 callback(); |
| 13 } | 13 } |
| 14 | 14 |
| 15 var requestsPending = 2; | 15 var requestsPending = 2; |
| 16 var image = new Image(); | 16 var image = new Image(); |
| 17 image.onload = onRequestFinished; | 17 image.onload = onRequestFinished; |
| 18 image.src = "resources/anImage.png"; | 18 image.src = "../resources/anImage.png"; |
| 19 | 19 |
| 20 var script = document.createElement("script"); | 20 var script = document.createElement("script"); |
| 21 script.src = "timeline-network-resource.js"; | 21 script.src = "timeline-network-resource.js"; |
| 22 document.body.appendChild(script); | 22 document.body.appendChild(script); |
| 23 window.timelineNetworkResourceEvaluated = onRequestFinished; | 23 window.timelineNetworkResourceEvaluated = onRequestFinished; |
| 24 } | 24 } |
| 25 | 25 |
| 26 function test() | 26 function test() |
| 27 { | 27 { |
| 28 var model = WebInspector.panels.timeline._model; | 28 var model = WebInspector.panels.timeline._model; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 55 | 55 |
| 56 </script> | 56 </script> |
| 57 </head> | 57 </head> |
| 58 | 58 |
| 59 <body onload="runTest()"> | 59 <body onload="runTest()"> |
| 60 <p> | 60 <p> |
| 61 Tests the Timeline UI API for network requests. | 61 Tests the Timeline UI API for network requests. |
| 62 </p> | 62 </p> |
| 63 </body> | 63 </body> |
| 64 </html> | 64 </html> |
| OLD | NEW |