dom/smil/test/test_smilCSSFromBy.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

     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_smilCSSPropertyList.js"></script>
     7   <script type="text/javascript" src="db_smilCSSFromBy.js"></script>
     8   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     9 </head>
    10 <body>
    11 <p id="display"></p>
    12 <div id="content">
    13 <svg xmlns="http://www.w3.org/2000/svg"
    14      width="200px" height="200px" font-size="50px" style="color: rgb(50,50,50)"
    15      onload="this.pauseAnimations()">
    16   <rect x="20" y="20" width="200" height="200"/>
    17   <!-- NOTE: hard-wiring 'line-height' so that computed value of 'font' is
    18        more predictable. (otherwise, line-height varies depending on platform)
    19     -->
    20   <text x="20" y="20" style="line-height: 10px !important">testing 123</text>
    21   <line/>
    22   <marker/>
    23   <filter><feDiffuseLighting/></filter>
    24 </svg>
    25 </div>
    26 <pre id="test">
    27 <script class="testbody" type="text/javascript">
    28 <![CDATA[
    30 SimpleTest.waitForExplicitFinish();
    32 function main()
    33 {
    34   // Start out with document paused
    35   var svg = SMILUtil.getSVGRoot();
    36   ok(svg.animationsPaused(), "should be paused by <svg> load handler");
    37   is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler");
    39   testBundleList(gFromByBundles, new SMILTimingData(1.0, 1.0));
    41   // Set "display:none" on everything and run the tests again
    42   SMILUtil.hideSubtree(SMILUtil.getSVGRoot(), false, false);
    43   testBundleList(gFromByBundles, new SMILTimingData(1.0, 1.0));
    45   SimpleTest.finish();
    46 }
    48 window.addEventListener("load", main, false);
    49 ]]>
    50 </script>
    51 </pre>
    52 </body>
    53 </html>

mercurial