| 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 onImageLoad() | 9 function onImageLoad() |
| 10 { | 10 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 window.timelineNetworkResourceEvaluated = scriptEvaluated; | 30 window.timelineNetworkResourceEvaluated = scriptEvaluated; |
| 31 } | 31 } |
| 32 | 32 |
| 33 function test() | 33 function test() |
| 34 { | 34 { |
| 35 InspectorTest.invokeAsyncWithTimeline("performActions", done); | 35 InspectorTest.invokeAsyncWithTimeline("performActions", done); |
| 36 | 36 |
| 37 function done() | 37 function done() |
| 38 { | 38 { |
| 39 InspectorTest.addResult("Script evaluated."); | 39 InspectorTest.addResult("Script evaluated."); |
| 40 var filteredRecords = InspectorTest.filterTimelineRecords("ResourceRecei
vedData"); | 40 var record = InspectorTest.findFirstTimelineRecord("ResourceReceivedData
"); |
| 41 if (filteredRecords.length) { | 41 if (record) { |
| 42 var record = filteredRecords[0]; | 42 if (record.data() && typeof record.data().encodedDataLength === "num
ber") |
| 43 if (record.data && record.data && typeof record.data.encodedDataLeng
th === "number") | |
| 44 InspectorTest.addResult("Resource received data has length, test
passed."); | 43 InspectorTest.addResult("Resource received data has length, test
passed."); |
| 45 } | 44 } |
| 46 InspectorTest.completeTest(); | 45 InspectorTest.completeTest(); |
| 47 } | 46 } |
| 48 } | 47 } |
| 49 | 48 |
| 50 </script> | 49 </script> |
| 51 </head> | 50 </head> |
| 52 | 51 |
| 53 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 54 <p> | 53 <p> |
| 55 Tests the Timeline API instrumentation of a network resource received data | 54 Tests the Timeline API instrumentation of a network resource received data |
| 56 </p> | 55 </p> |
| 57 </body> | 56 </body> |
| 58 </html> | 57 </html> |
| OLD | NEW |