image/test/mochitest/test_svg_animatedGIF.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/image/test/mochitest/test_svg_animatedGIF.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=666446
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 666446 - Animated Raster Images inside of SVG Frames</title>
    1.11 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
    1.13 +  <script type="application/javascript" src="imgutils.js"></script>
    1.14 +  <script type="application/javascript" src="animationPolling.js"></script>
    1.15 +  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.16 +</head>
    1.17 +
    1.18 +<!--  Make sure embed element is snapped to an exact pixel. -->
    1.19 +<div class="bug-header" style="height: 100px;">
    1.20 +  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666446">
    1.21 +  Mozilla Bug 666446: lots of animated gifs swamp us with paint events
    1.22 +  </a>
    1.23 +</div>
    1.24 +
    1.25 +<p id="display"></p>
    1.26 +<div id="content">
    1.27 +  <div id="referenceDiv" style="height: 40px; width: 40px;
    1.28 +                                display: none; background: #2aff00"></div>
    1.29 +    <!--
    1.30 +        We use <embed> here instead of <img> because the <img> tag utilizes
    1.31 +        the VectorImage class for SVG, whereas in this test, we are testing
    1.32 +        RasterImage.
    1.33 +     -->
    1.34 +  <embed id="embeddedSVG" src="animation.svg" type="image/svg+xml" style="display: none;"/>
    1.35 +</div>
    1.36 +<div id="debug" style="display:none"></div>
    1.37 +<pre id="test">
    1.38 +<script type="text/javascript;version=1.8">
    1.39 +
    1.40 +/** Test for Bug 666446 nsSVGImageFrame/RasterImage**/
    1.41 +
    1.42 +const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes)
    1.43 +
    1.44 +function main() {
    1.45 +  var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv',
    1.46 +                                   'embeddedSVG', 'debug', '');
    1.47 +  animTest.beginTest();
    1.48 +}
    1.49 +
    1.50 +window.onload = main;
    1.51 +
    1.52 +</script>
    1.53 +</pre>
    1.54 +</body>
    1.55 +</html>

mercurial