test_smilAnimateMotion.xhtml (1692B)
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <!-- 3 https://bugzilla.mozilla.org/show_bug.cgi?id=436418 4 --> 5 <head> 6 <title>Test for animateMotion behavior</title> 7 <script src="/tests/SimpleTest/SimpleTest.js"></script> 8 <script type="text/javascript" src="smilTestUtils.js"></script> 9 <script type="text/javascript" src="db_smilAnimateMotion.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436418">Mozilla Bug 436418</a> 14 <p id="display"></p> 15 <div id="content" style="visibility: hidden"> 16 17 <!-- NOTE: Setting font-size so we can test 'em' units --> 18 <svg xmlns="http://www.w3.org/2000/svg" 19 width="200px" height="200px" style="font-size: 500px" 20 onload="this.pauseAnimations()"> 21 <!-- XXXdholbert Right now, 'em' conversions are correct if we set font-size 22 on rect using the inline style attr. However, if we use 'font-size' attr, 23 then 'em' units end up using the inherited font-size instead. Bug? --> 24 <rect x="20" y="20" width="200" height="200" style="font-size: 10px"/> 25 </svg> 26 </div> 27 <pre id="test"> 28 <script class="testbody" type="text/javascript"> 29 <![CDATA[ 30 31 SimpleTest.waitForExplicitFinish(); 32 33 function main() 34 { 35 // Start out with document paused 36 var svg = SMILUtil.getSVGRoot(); 37 ok(svg.animationsPaused(), "should be paused by <svg> load handler"); 38 is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler"); 39 40 var timingData = new SMILTimingData(1.0, 6.0); 41 testBundleList(gMotionBundles, timingData); 42 43 SimpleTest.finish(); 44 } 45 46 window.addEventListener("load", main); 47 ]]> 48 </script> 49 </pre> 50 </body> 51 </html>