dom/smil/test/test_smilAnimateMotion.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/smil/test/test_smilAnimateMotion.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<!--
     1.6 +https://bugzilla.mozilla.org/show_bug.cgi?id=436418
     1.7 +-->
     1.8 +<head>
     1.9 +  <title>Test for animateMotion behavior</title>
    1.10 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.11 +  <script type="text/javascript" src="smilTestUtils.js"></script>
    1.12 +  <script type="text/javascript" src="db_smilAnimateMotion.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.14 +</head>
    1.15 +<body>
    1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436418">Mozilla Bug 436418</a>
    1.17 +<p id="display"></p>
    1.18 +<div id="content" style="visibility: hidden">
    1.19 +
    1.20 +<!-- NOTE: Setting font-size so we can test 'em' units -->
    1.21 +<svg xmlns="http://www.w3.org/2000/svg"
    1.22 +     width="200px" height="200px" style="font-size: 500px"
    1.23 +     onload="this.pauseAnimations()">
    1.24 +  <!-- XXXdholbert Right now, 'em' conversions are correct if we set font-size
    1.25 +       on rect using the inline style attr. However, if we use 'font-size' attr,
    1.26 +       then 'em' units end up using the inherited font-size instead. Bug? -->
    1.27 +  <rect x="20" y="20" width="200" height="200" style="font-size: 10px"/>
    1.28 +</svg>
    1.29 +</div>
    1.30 +<pre id="test">
    1.31 +<script class="testbody" type="text/javascript">
    1.32 +<![CDATA[
    1.33 +
    1.34 +SimpleTest.waitForExplicitFinish();
    1.35 +
    1.36 +function main()
    1.37 +{
    1.38 +  // Start out with document paused
    1.39 +  var svg = SMILUtil.getSVGRoot();
    1.40 +  ok(svg.animationsPaused(), "should be paused by <svg> load handler");
    1.41 +  is(svg.getCurrentTime(), 0, "should be paused at 0 in <svg> load handler");
    1.42 +
    1.43 +  var timingData = new SMILTimingData(1.0, 6.0);
    1.44 +  testBundleList(gMotionBundles, timingData);
    1.45 +
    1.46 +  SimpleTest.finish();
    1.47 +}
    1.48 +
    1.49 +window.addEventListener("load", main, false);
    1.50 +]]>
    1.51 +</script>
    1.52 +</pre>
    1.53 +</body>
    1.54 +</html>

mercurial