test_svg_animatedGIF.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <script type="application/javascript" 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. <!-- Make sure embed element is snapped to an exact pixel. -->
  15. <div class="bug-header" style="height: 100px;">
  16. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666446">
  17. Mozilla Bug 666446: lots of animated gifs swamp us with paint events
  18. </a>
  19. </div>
  20. <p id="display"></p>
  21. <div id="content">
  22. <div id="referenceDiv" style="height: 40px; width: 40px;
  23. display: none; background: #2aff00"></div>
  24. <!--
  25. We use <embed> here instead of <img> because the <img> tag utilizes
  26. the VectorImage class for SVG, whereas in this test, we are testing
  27. RasterImage.
  28. -->
  29. <embed id="embeddedSVG" src="animation.svg" type="image/svg+xml"
  30. style="height: 40px; width: 40px; display: none;"/>
  31. </div>
  32. <div id="debug" style="display:none"></div>
  33. <pre id="test">
  34. <script type="text/javascript;version=1.8">
  35. /** Test for Bug 666446 nsSVGImageFrame/RasterImage**/
  36. const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes)
  37. function main() {
  38. var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv',
  39. 'embeddedSVG', 'debug', '');
  40. animTest.beginTest();
  41. }
  42. window.onload = main;
  43. </script>
  44. </pre>
  45. </body>
  46. </html>