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() | 9 function performActions() |
10 { | 10 { |
11 var script = document.createElement("script"); | 11 var script = document.createElement("script"); |
12 script.src = scriptUrl; | 12 script.src = scriptUrl; |
13 document.body.appendChild(script); | 13 document.body.appendChild(script); |
14 } | 14 } |
15 | 15 |
16 function test() | 16 function test() |
17 { | 17 { |
18 var requestId; | 18 var requestId; |
19 var scriptUrl = "timeline-network-resource.js"; | 19 var scriptUrl = "timeline-network-resource.js"; |
20 | 20 |
21 var model = WebInspector.panels.timeline._model; | 21 var model = WebInspector.panels.timeline._model; |
22 var presentationModel = InspectorTest.timelinePresentationModel(); | 22 var presentationModel = InspectorTest.timelinePresentationModel(); |
23 | 23 |
24 InspectorTest.startTimeline(step1); | 24 InspectorTest.startTimeline(step1); |
25 | 25 |
26 function step1() | 26 function step1() |
27 { | 27 { |
28 InspectorTest.evaluateInPage("performActions()"); | 28 InspectorTest.evaluateInPage("performActions()"); |
29 InspectorTest.addConsoleSniffer(step2); | |
30 } | 29 } |
31 | 30 |
32 function step2() | 31 // It will be called from timeline-network-resource.js script by evaluateInW
ebInspector call. |
| 32 InspectorTest.scriptEvaluated = function() |
33 { | 33 { |
34 InspectorTest.stopTimeline(step3); | 34 InspectorTest.stopTimeline(step3); |
35 } | 35 } |
36 | 36 |
37 function step3() | 37 function step3() |
38 { | 38 { |
39 var lastRecordStartTime; | 39 var lastRecordStartTime; |
40 function format(record) | 40 function format(record) |
41 { | 41 { |
42 if (record.type() === WebInspector.TimelineModel.RecordType.Resource
SendRequest) | 42 if (record.type() === WebInspector.TimelineModel.RecordType.Resource
SendRequest) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 </script> | 94 </script> |
95 </head> | 95 </head> |
96 | 96 |
97 <body onload="runTest()"> | 97 <body onload="runTest()"> |
98 <p> | 98 <p> |
99 Tests the Timeline API instrumentation of a network resource load | 99 Tests the Timeline API instrumentation of a network resource load |
100 </p> | 100 </p> |
101 </body> | 101 </body> |
102 </html> | 102 </html> |
OLD | NEW |