OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 div#img-container { | 4 div#img-container { |
5 position: relative; | 5 position: relative; |
6 width: 99px; | 6 width: 99px; |
7 height: 99px; | 7 height: 99px; |
8 overflow: clip; | 8 overflow: clip; |
9 } | 9 } |
10 </style> | 10 </style> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 testRunner.displayAsyncThen(showNextImage); | 50 testRunner.displayAsyncThen(showNextImage); |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
54 function test() | 54 function test() |
55 { | 55 { |
56 InspectorTest.invokeAsyncWithTimeline("displayImages", dumpRecords); | 56 InspectorTest.invokeAsyncWithTimeline("displayImages", dumpRecords); |
57 | 57 |
58 function dumpRecords(records) | 58 function dumpRecords(records) |
59 { | 59 { |
60 for (var i = 0; i < records.length; ++i) { | 60 InspectorTest.timelineModel().forAllRecords(processRecord.bind(this)); |
61 var record = records[i]; | 61 function processRecord(record) |
62 if (record.type === WebInspector.TimelineModel.RecordType.DecodeImag
e || record.type === WebInspector.TimelineModel.RecordType.ResizeImage) { | 62 { |
| 63 if (record.type() === WebInspector.TimelineModel.RecordType.DecodeIm
age || record.type() === WebInspector.TimelineModel.RecordType.ResizeImage) { |
63 // Some decode events may happen in the background, so we won't
have a stack trace. | 64 // Some decode events may happen in the background, so we won't
have a stack trace. |
64 delete record.stackTrace; | 65 delete record._record.stackTrace; |
65 InspectorTest.printTimelineRecordProperties(record); | 66 InspectorTest.printTimelineRecordProperties(record); |
66 } | 67 } |
67 } | 68 } |
68 InspectorTest.completeTest(); | 69 InspectorTest.completeTest(); |
69 } | 70 } |
70 } | 71 } |
71 | 72 |
72 </script> | 73 </script> |
73 </head> | 74 </head> |
74 | 75 |
75 <body onload="runTest()"> | 76 <body onload="runTest()"> |
76 <p> | 77 <p> |
77 Tests the Timeline API instrumentation of a DecodeImage and ResizeImage events | 78 Tests the Timeline API instrumentation of a DecodeImage and ResizeImage events |
78 </p> | 79 </p> |
79 <div id="img-container"><img></div> | 80 <div id="img-container"><img></div> |
80 </body> | 81 </body> |
81 </html> | 82 </html> |
OLD | NEW |