dom/smil/test/test_smilMappedAttrFromBy.xhtml

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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_smilCSSFromBy.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   <!-- NOTE: hard-wiring 'line-height' so that computed value of 'font' is
    19        more predictable. (otherwise, line-height varies depending on platform)
    20     -->
    21   <text x="20" y="20" style="line-height: 10px !important">testing 123</text>
    22   <line/>
    23   <marker/>
    24   <filter><feDiffuseLighting/></filter>
    25 </svg>
    26 </div>
    27 <pre id="test">
    28 <script class="testbody" type="text/javascript">
    29 <![CDATA[
    31 SimpleTest.waitForExplicitFinish();
    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");
    40   var testBundles = convertCSSBundlesToMappedAttr(gFromByBundles);
    41   testBundleList(testBundles, new SMILTimingData(1.0, 1.0));
    43   // Set "display:none" on everything and run the tests again
    44   SMILUtil.hideSubtree(SMILUtil.getSVGRoot(), false, true);
    45   testBundleList(testBundles, new SMILTimingData(1.0, 1.0));
    47   SimpleTest.finish();
    48 }
    50 window.addEventListener("load", main, false);
    51 ]]>
    52 </script>
    53 </pre>
    54 </body>
    55 </html>

mercurial