| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 div { | 4 div { |
| 5 display: inline-block; | 5 display: inline-block; |
| 6 } | 6 } |
| 7 | 7 |
| 8 div.img-container { | 8 div.img-container { |
| 9 position: relative; | 9 position: relative; |
| 10 width: 99px; | 10 width: 99px; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 function showImages(callback) | 40 function showImages(callback) |
| 41 { | 41 { |
| 42 var nextImageIndex = 0; | 42 var nextImageIndex = 0; |
| 43 | 43 |
| 44 addImages(); | 44 addImages(); |
| 45 | 45 |
| 46 function addImages() | 46 function addImages() |
| 47 { | 47 { |
| 48 if (nextImageIndex >= images.length) { | 48 if (nextImageIndex >= images.length) { |
| 49 testRunner.layoutAndPaintAsyncThen(callback); | 49 // Allow several frames for image decoding to complete on rasterizer
threads. |
| 50 generateFrames(3, callback); |
| 50 return; | 51 return; |
| 51 } | 52 } |
| 52 | 53 |
| 53 var imgContainer = document.createElement("div"); | 54 var imgContainer = document.createElement("div"); |
| 54 imgContainer.className = "img-container"; | 55 imgContainer.className = "img-container"; |
| 55 document.body.appendChild(imgContainer); | 56 document.body.appendChild(imgContainer); |
| 56 | 57 |
| 57 var imgElement = document.createElement("img"); | 58 var imgElement = document.createElement("img"); |
| 58 imgElement.addEventListener("load", testRunner.layoutAndPaintAsyncThen.b
ind(testRunner, addImages)); | 59 imgElement.addEventListener("load", testRunner.layoutAndPaintAsyncThen.b
ind(testRunner, addImages)); |
| 59 imgContainer.appendChild(imgElement); | 60 imgContainer.appendChild(imgElement); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 </script> | 110 </script> |
| 110 </head> | 111 </head> |
| 111 | 112 |
| 112 <body onload="runTest()"> | 113 <body onload="runTest()"> |
| 113 <p> | 114 <p> |
| 114 Tests the instrumentation of a DecodeImage and ResizeImage events | 115 Tests the instrumentation of a DecodeImage and ResizeImage events |
| 115 </p> | 116 </p> |
| 116 </body> | 117 </body> |
| 117 </html> | 118 </html> |
| OLD | NEW |