dom/smil/test/test_smilCSSInvalidValues.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/smil/test/test_smilCSSInvalidValues.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<head>
     1.6 +  <title>Test for Animation Behavior on CSS Properties</title>
     1.7 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.8 +  <script type="text/javascript" src="smilTestUtils.js"></script>
     1.9 +  <script type="text/javascript" src="db_smilCSSPropertyList.js"></script>
    1.10 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.11 +</head>
    1.12 +<body>
    1.13 +<p id="display"></p>
    1.14 +<div id="content">
    1.15 +<svg xmlns="http://www.w3.org/2000/svg"
    1.16 +     onload="this.pauseAnimations()">
    1.17 +  <rect x="20" y="20" width="200" height="200"/>
    1.18 +</svg>
    1.19 +</div>
    1.20 +<pre id="test">
    1.21 +<script class="testbody" type="text/javascript">
    1.22 +<![CDATA[
    1.23 +
    1.24 +SimpleTest.waitForExplicitFinish();
    1.25 +
    1.26 +var invalidTestcaseBundles = [
    1.27 +  new TestcaseBundle(gPropList.opacity, [
    1.28 +    new AnimTestcaseFromTo("", "",     { noEffect: true }),
    1.29 +    new AnimTestcaseFromTo("", "0.5",  { noEffect: true }),
    1.30 +    new AnimTestcaseFromTo(".", "0.5", { noEffect: true }),
    1.31 +    new AnimTestcaseFromTo("0.5", "-", { noEffect: true }),
    1.32 +    new AnimTestcaseFromTo("0.5", "bogus",   { noEffect: true }),
    1.33 +    new AnimTestcaseFromTo("bogus", "bogus", { noEffect: true }),
    1.34 +  ]),
    1.35 +  new TestcaseBundle(gPropList.color, [
    1.36 +    new AnimTestcaseFromTo("", "",            { noEffect: true }),
    1.37 +    new AnimTestcaseFromTo("", "red",         { noEffect: true }),
    1.38 +    new AnimTestcaseFromTo("greeeen", "red",  { noEffect: true }),
    1.39 +    new AnimTestcaseFromTo("rgb(red, 255, 255)", "red", { noEffect: true }),
    1.40 +    new AnimTestcaseFromTo("#FFFFFFF", "red", { noEffect: true }),
    1.41 +    new AnimTestcaseFromTo("bogus", "bogus",  { noEffect: true }),
    1.42 +  ]),
    1.43 +];
    1.44 +function main()
    1.45 +{
    1.46 +  // Start out with document paused
    1.47 +  var svg = SMILUtil.getSVGRoot();
    1.48 +  ok(svg.animationsPaused(), "should be paused by <svg> load handler");
    1.49 +  is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler");
    1.50 +
    1.51 +  // Run the tests
    1.52 +  testBundleList(invalidTestcaseBundles, new SMILTimingData(1.0, 1.0));
    1.53 +
    1.54 +  SimpleTest.finish();
    1.55 +}
    1.56 +
    1.57 +window.addEventListener("load", main, false);
    1.58 +]]>
    1.59 +</script>
    1.60 +</pre>
    1.61 +</body>
    1.62 +</html>

mercurial