|
1 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
2 <head> |
|
3 <title>Test for Animation Behavior on CSS Properties</title> |
|
4 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
5 <script type="text/javascript" src="smilTestUtils.js"></script> |
|
6 <script type="text/javascript" src="db_smilMappedAttrList.js"></script> |
|
7 <script type="text/javascript" src="db_smilCSSPropertyList.js"></script> |
|
8 <script type="text/javascript" src="db_smilCSSPaced.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 </head> |
|
11 <body> |
|
12 <p id="display"></p> |
|
13 <div id="content"> |
|
14 <svg xmlns="http://www.w3.org/2000/svg" |
|
15 width="200px" height="200px" font-size="50px" style="color: rgb(50,50,50)" |
|
16 onload="this.pauseAnimations()"> |
|
17 <rect x="20" y="20" width="200" height="200"/> |
|
18 <text x="20" y="20">testing 123</text> |
|
19 <marker/> |
|
20 </svg> |
|
21 </div> |
|
22 <pre id="test"> |
|
23 <script class="testbody" type="text/javascript"> |
|
24 <![CDATA[ |
|
25 |
|
26 SimpleTest.waitForExplicitFinish(); |
|
27 |
|
28 function main() |
|
29 { |
|
30 // Start out with document paused |
|
31 var svg = SMILUtil.getSVGRoot(); |
|
32 ok(svg.animationsPaused(), "should be paused by <svg> load handler"); |
|
33 is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler"); |
|
34 |
|
35 var testBundles = convertCSSBundlesToMappedAttr(gPacedBundles); |
|
36 testBundleList(testBundles, new SMILTimingData(1.0, 6.0)); |
|
37 |
|
38 // Set "display:none" on everything and run the tests again |
|
39 SMILUtil.hideSubtree(SMILUtil.getSVGRoot(), false, true); |
|
40 testBundleList(testBundles, new SMILTimingData(1.0, 6.0)); |
|
41 |
|
42 SimpleTest.finish(); |
|
43 } |
|
44 |
|
45 window.addEventListener("load", main, false); |
|
46 ]]> |
|
47 </script> |
|
48 </pre> |
|
49 </body> |
|
50 </html> |