test_svg_animatedGIF.html (1764B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=666446 5 --> 6 <head> 7 <title>Test for Bug 666446 - Animated Raster Images inside of SVG Frames</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script src="/tests/SimpleTest/WindowSnapshot.js"></script> 10 <script type="application/javascript" src="imgutils.js"></script> 11 <script type="application/javascript" src="animationPolling.js"></script> 12 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 13 </head> 14 15 <!-- Make sure embed element is snapped to an exact pixel. --> 16 <div class="bug-header" style="height: 100px;"> 17 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666446"> 18 Mozilla Bug 666446: lots of animated gifs swamp us with paint events 19 </a> 20 </div> 21 22 <p id="display"></p> 23 <div id="content"> 24 <div id="referenceDiv" style="height: 40px; width: 40px; 25 display: none; background: #2aff00"></div> 26 <!-- 27 We use <embed> here instead of <img> because the <img> tag utilizes 28 the VectorImage class for SVG, whereas in this test, we are testing 29 RasterImage. 30 --> 31 <embed id="embeddedSVG" src="animation.svg" type="image/svg+xml" 32 style="height: 40px; width: 40px; display: none;"/> 33 </div> 34 <div id="debug" style="display:none"></div> 35 <pre id="test"> 36 <script type="text/javascript"> 37 38 /** Test for Bug 666446 SVGImageFrame/RasterImage*/ 39 40 const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes) 41 42 function main() { 43 var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv', 44 'embeddedSVG', 'debug', ''); 45 animTest.beginTest(); 46 } 47 48 window.onload = main; 49 50 </script> 51 </pre> 52 </body> 53 </html>