dom/smil/test/test_smilCSSInvalidValues.xhtml

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial