Chromium Code Reviews| 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 var callback; | |
|
caseq
2016/08/05 17:56:42
drop this, assign directly to window.timelineNetwo
kozy
2016/08/10 01:21:14
Done.
| |
| 12 var promise = new Promise((fulfill) => callback = fulfill); | |
| 11 window.timelineNetworkResourceEvaluated = callback; | 13 window.timelineNetworkResourceEvaluated = callback; |
| 12 var script = document.createElement("script"); | 14 var script = document.createElement("script"); |
| 13 script.src = scriptUrl; | 15 script.src = scriptUrl; |
| 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 var requestId; | 22 var requestId; |
| 20 var scriptUrl = "timeline-network-resource.js"; | 23 var scriptUrl = "timeline-network-resource.js"; |
| 21 | 24 |
| 22 var model = WebInspector.panels.timeline._model; | 25 var model = WebInspector.panels.timeline._model; |
| 23 | 26 |
| 24 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | 27 InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 83 |
| 81 </script> | 84 </script> |
| 82 </head> | 85 </head> |
| 83 | 86 |
| 84 <body onload="runTest()"> | 87 <body onload="runTest()"> |
| 85 <p> | 88 <p> |
| 86 Tests the Timeline API instrumentation of a network resource load | 89 Tests the Timeline API instrumentation of a network resource load |
| 87 </p> | 90 </p> |
| 88 </body> | 91 </body> |
| 89 </html> | 92 </html> |
| OLD | NEW |