| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <title>Skipping up to the last frame of an animated gif shouldn't crash.</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <img id="image" src="resources/three_frame_100ms.gif"> |
| 6 <script> |
| 7 async_test(function(test) { |
| 8 image.onload = function() { |
| 9 setTimeout(function() { |
| 10 var start = performance.now(); |
| 11 while (true) { |
| 12 // Block the main thread for 300ms. |
| 13 if (performance.now() - start >= 300) |
| 14 break; |
| 15 } |
| 16 // Painting will force the gif to advance to the last frame. |
| 17 requestAnimationFrame(function() { |
| 18 test.done(); |
| 19 }); |
| 20 }, 30); |
| 21 } |
| 22 }); |
| 23 </script> |
| OLD | NEW |