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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 requestAnimationFrame(function() { testRunner.displayAsyncThen(addImages
); } ); | 51 requestAnimationFrame(function() { testRunner.displayAsyncThen(addImages
); } ); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 function test() | 56 function test() |
57 { | 57 { |
58 var imageCount = 0; | 58 var imageCount = 0; |
59 | 59 |
60 InspectorTest.invokeWithTracing("-*,devtools,disabled-by-default-devtools.ti
meline*", "showImages", onTracingComplete); | 60 InspectorTest.invokeWithTracing("-*,devtools,disabled-by-default-devtools.ti
meline*", "showImages", onTracingComplete); |
61 var tracineTimelineModel = new WebInspector.TracingTimelineModel(InspectorTe
st.tracingModel); | |
62 tracineTimelineModel.willStartRecordingTraceEvents(); | |
63 function onTracingComplete() | 61 function onTracingComplete() |
64 { | 62 { |
65 tracineTimelineModel.didStopRecordingTraceEvents(); | 63 var events = InspectorTest.tracingTimelineModel.inspectedTargetEvents(); |
66 var events = tracineTimelineModel.inspectedTargetEvents(); | |
67 for (var i = 0; i < events.length; ++i) { | 64 for (var i = 0; i < events.length; ++i) { |
68 var event = events[i]; | 65 var event = events[i]; |
69 if (events[i].name !== WebInspector.TracingTimelineModel.RecordType.
DecodeImage) | 66 if (events[i].name !== WebInspector.TracingTimelineModel.RecordType.
DecodeImage) |
70 continue; | 67 continue; |
71 InspectorTest.addResult("event: " + event.name); | 68 InspectorTest.addResult("event: " + event.name); |
72 InspectorTest.addResult("imageURL: " + InspectorTest.formatters.form
atAsURL(event.imageURL)); | 69 InspectorTest.addResult("imageURL: " + InspectorTest.formatters.form
atAsURL(event.imageURL)); |
73 InspectorTest.addResult("backendNodeId: " + (event.backendNodeId > 0
? "present" : "absent")); | 70 InspectorTest.addResult("backendNodeId: " + (event.backendNodeId > 0
? "present" : "absent")); |
74 } | 71 } |
75 InspectorTest.completeTest(); | 72 InspectorTest.completeTest(); |
76 } | 73 } |
77 } | 74 } |
78 | 75 |
79 </script> | 76 </script> |
80 </head> | 77 </head> |
81 | 78 |
82 <body onload="runTest()"> | 79 <body onload="runTest()"> |
83 <p> | 80 <p> |
84 Tests the instrumentation of a DecodeImage and ResizeImage events | 81 Tests the instrumentation of a DecodeImage and ResizeImage events |
85 </p> | 82 </p> |
86 <div id="img-container"><img></div> | 83 <div id="img-container"><img></div> |
87 </body> | 84 </body> |
88 </html> | 85 </html> |
OLD | NEW |