1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/image/test/mochitest/test_animation.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 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 - General Animated GIF Test</title> 1.11 + <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script> 1.12 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> 1.14 + <script type="application/javascript" src="imgutils.js"></script> 1.15 + <script type="application/javascript" src="animationPolling.js"></script> 1.16 + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.17 +</head> 1.18 +<body> 1.19 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666446"> 1.20 +Mozilla Bug 666446: lots of animated gifs swamp us with paint events 1.21 +</a> 1.22 +<p id="display"></p> 1.23 + 1.24 +<div id="content"> 1.25 + <div id="referenceDiv" style="height: 40px; width: 40px; 1.26 + display: none; background: #2aff00"></div> 1.27 + <div id="animatedImage"> 1.28 + <img id="animatedGif" src="animated-gif.gif" style="display: none;"> 1.29 + <div id="text-descr"></div> 1.30 + </div> 1.31 + <div id="debug" style="display:none"> 1.32 + </div> 1.33 +</div> 1.34 +<pre id="test"> 1.35 +<script type="text/javascript;version=1.8"> 1.36 +const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes) 1.37 + 1.38 +function main() 1.39 +{ 1.40 + var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv', 1.41 + 'animatedGif', 'debug'); 1.42 + animTest.beginTest(); 1.43 +} 1.44 + 1.45 +window.onload = main; 1.46 +</script> 1.47 +</pre> 1.48 +</body> 1.49 +</html>