test_smilCSSInvalidValues.xhtml (2046B)
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <head> 3 <title>Test for Animation Behavior on CSS Properties</title> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <script type="text/javascript" src="smilTestUtils.js"></script> 6 <script type="text/javascript" src="db_smilCSSPropertyList.js"></script> 7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 8 </head> 9 <body> 10 <p id="display"></p> 11 <div id="content"> 12 <svg xmlns="http://www.w3.org/2000/svg" 13 onload="this.pauseAnimations()"> 14 <rect x="20" y="20" width="200" height="200"/> 15 </svg> 16 </div> 17 <pre id="test"> 18 <script class="testbody" type="text/javascript"> 19 <![CDATA[ 20 21 SimpleTest.waitForExplicitFinish(); 22 23 var invalidTestcaseBundles = [ 24 new TestcaseBundle(gPropList.opacity, [ 25 new AnimTestcaseFromTo("", "", { noEffect: true }), 26 new AnimTestcaseFromTo("", "0.5", { noEffect: true }), 27 new AnimTestcaseFromTo(".", "0.5", { noEffect: true }), 28 new AnimTestcaseFromTo("0.5", "-", { noEffect: true }), 29 new AnimTestcaseFromTo("0.5", "bogus", { noEffect: true }), 30 new AnimTestcaseFromTo("bogus", "bogus", { noEffect: true }), 31 ]), 32 new TestcaseBundle(gPropList.color, [ 33 new AnimTestcaseFromTo("", "", { noEffect: true }), 34 new AnimTestcaseFromTo("", "red", { noEffect: true }), 35 new AnimTestcaseFromTo("greeeen", "red", { noEffect: true }), 36 new AnimTestcaseFromTo("rgb(red, 255, 255)", "red", { noEffect: true }), 37 new AnimTestcaseFromTo("#FFFFFFF", "red", { noEffect: true }), 38 new AnimTestcaseFromTo("bogus", "bogus", { noEffect: true }), 39 ]), 40 ]; 41 function main() 42 { 43 // Start out with document paused 44 var svg = SMILUtil.getSVGRoot(); 45 ok(svg.animationsPaused(), "should be paused by <svg> load handler"); 46 is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler"); 47 48 // Run the tests 49 testBundleList(invalidTestcaseBundles, new SMILTimingData(1.0, 1.0)); 50 51 SimpleTest.finish(); 52 } 53 54 window.addEventListener("load", main); 55 ]]> 56 </script> 57 </pre> 58 </body> 59 </html>