| 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() | 7 function performActions() |
| 8 { | 8 { |
| 9 var image = new Image(); | 9 var image = new Image(); |
| 10 image.onload = bar; | 10 image.onload = bar; |
| 11 image.src = "resources/anImage.png"; | 11 image.src = "resources/anImage.png"; |
| 12 | 12 |
| 13 function bar() { | 13 function bar() { |
| 14 var image = new Image(); | 14 var image = new Image(); |
| 15 image.onload = function() { testRunner.evaluateInWebInspector(0, "window
.step2()"); } | 15 image.onload = function() { testRunner.evaluateInWebInspector(0, "window
.step2()"); } |
| 16 image.src = "resources/anotherImage.png"; | 16 image.src = "resources/anotherImage.png"; |
| 17 } | 17 } |
| 18 } | 18 } |
| 19 | 19 |
| 20 function test() | 20 function test() |
| 21 { | 21 { |
| 22 WebInspector.inspectorView.showPanel("timeline"); | 22 WebInspector.inspectorView.showPanel("timeline"); |
| 23 WebInspector.panels.timeline._model._collectionEnabled = true; | 23 WebInspector.panels.timeline._model._collectionEnabled = true; |
| 24 WebInspector.inspectorView.panel("timeline")._model._currentTarget = WebInsp
ector.targetManager.mainTarget(); |
| 24 | 25 |
| 25 TimelineAgent.start(step1); | 26 TimelineAgent.start(step1); |
| 26 | 27 |
| 27 function step1() | 28 function step1() |
| 28 { | 29 { |
| 29 InspectorTest.evaluateInPage("performActions()"); | 30 InspectorTest.evaluateInPage("performActions()"); |
| 30 } | 31 } |
| 31 | 32 |
| 32 window.step2 = function() | 33 window.step2 = function() |
| 33 { | 34 { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 </script> | 69 </script> |
| 69 </head> | 70 </head> |
| 70 | 71 |
| 71 <body onload="runTest()"> | 72 <body onload="runTest()"> |
| 72 <p> | 73 <p> |
| 73 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. | 74 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. |
| 74 </p> | 75 </p> |
| 75 | 76 |
| 76 </body> | 77 </body> |
| 77 </html> | 78 </html> |
| OLD | NEW |