image/test/mochitest/test_animation2.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <html>
michael@0 3 <!--
michael@0 4 https://bugzilla.mozilla.org/show_bug.cgi?id=705580
michael@0 5 -->
michael@0 6 <head>
michael@0 7 <title>Test for Bug 705580 - General Animated GIF Test 2</title>
michael@0 8 <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
michael@0 9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
michael@0 11 <script type="application/javascript" src="imgutils.js"></script>
michael@0 12 <script type="application/javascript" src="animationPolling.js"></script>
michael@0 13 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 14 </head>
michael@0 15 <body>
michael@0 16 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=705580">
michael@0 17 Mozilla Bug 705580: Test animated GIFs that are converted to ImageLayers
michael@0 18 </a>
michael@0 19 <p id="display"></p>
michael@0 20
michael@0 21 <div id="content">
michael@0 22 <!--
michael@0 23 Use an opacity of almost-1 to force a ContainerLayer with opacity, and the img as the sole item in the ThebesLayer. It should then
michael@0 24 be promoted to an ImageLayer.
michael@0 25 -->
michael@0 26 <div id="referenceDiv" style="height: 40px; width: 40px;
michael@0 27 display: none; background: #2aff00;"></div>
michael@0 28 <div id="animatedImage" style="opacity: 0.9999;">
michael@0 29 <img id="animatedGif" src="animated-gif.gif" style="display: none;">
michael@0 30 <div id="text-descr"></div>
michael@0 31 </div>
michael@0 32 <div id="debug" style="display:none">
michael@0 33 </div>
michael@0 34 </div>
michael@0 35 <pre id="test">
michael@0 36 <script type="text/javascript;version=1.8">
michael@0 37 const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes)
michael@0 38
michael@0 39 function main()
michael@0 40 {
michael@0 41 var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv',
michael@0 42 'animatedGif', 'debug');
michael@0 43 animTest.beginTest();
michael@0 44 }
michael@0 45
michael@0 46 window.onload = main;
michael@0 47 </script>
michael@0 48 </pre>
michael@0 49 </body>
michael@0 50 </html>

mercurial