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 21 matching lines...) Expand all Loading... |
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 record = InspectorTest.findFirstTimelineRecord("ResourceReceivedData
"); | 40 var record = InspectorTest.findFirstTimelineRecord("ResourceReceivedData
"); |
41 if (record) { | 41 if (record) { |
42 if (record.data() && typeof record.data().encodedDataLength === "num
ber") | 42 var data = record.traceEvent().args["data"]; |
| 43 if (data && typeof data.encodedDataLength === "number") |
43 InspectorTest.addResult("Resource received data has length, test
passed."); | 44 InspectorTest.addResult("Resource received data has length, test
passed."); |
44 } | 45 } |
45 InspectorTest.completeTest(); | 46 InspectorTest.completeTest(); |
46 } | 47 } |
47 } | 48 } |
48 | 49 |
49 </script> | 50 </script> |
50 </head> | 51 </head> |
51 | 52 |
52 <body onload="runTest()"> | 53 <body onload="runTest()"> |
53 <p> | 54 <p> |
54 Tests the Timeline API instrumentation of a network resource received data | 55 Tests the Timeline API instrumentation of a network resource received data |
55 </p> | 56 </p> |
56 </body> | 57 </body> |
57 </html> | 58 </html> |
OLD | NEW |