test_animation2.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=705580
  5. -->
  6. <head>
  7. <title>Test for Bug 705580 - General Animated GIF Test 2</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. <body>
  15. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=705580">
  16. Mozilla Bug 705580: Test animated GIFs that are converted to ImageLayers
  17. </a>
  18. <p id="display"></p>
  19. <div id="content">
  20. <!--
  21. Use will-change: opacity to force a ContainerLayer, and the img as the sole item in the PaintedLayer. It should then
  22. be promoted to an ImageLayer.
  23. -->
  24. <div id="referenceDiv" style="height: 40px; width: 40px;
  25. display: none; background: #2aff00;"></div>
  26. <div id="animatedImage" style="will-change: opacity;">
  27. <img id="animatedGif" src="animated-gif.gif" style="display: none;">
  28. <div id="text-descr"></div>
  29. </div>
  30. <div id="debug" style="display:none">
  31. </div>
  32. </div>
  33. <pre id="test">
  34. <script type="text/javascript;version=1.8">
  35. const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes)
  36. function main()
  37. {
  38. var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv',
  39. 'animatedGif', 'debug');
  40. animTest.beginTest();
  41. }
  42. window.onload = main;
  43. </script>
  44. </pre>
  45. </body>
  46. </html>