1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=589436
6 <title>Test for non-animated strings
</title>
7 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
11 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=589436">Mozilla Bug
589436</a>
13 <div id=
"content" style=
"display: none">
14 <svg id=
"svg" xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" width=
"120px" height=
"120px"
15 onload=
"this.pauseAnimations()">
17 <path id=
"moveFarAway" d=
"M300,300 h0"/>
18 <path id=
"moveToUpperLeft" d=
"M100,100 h0"/>
21 <animate attributeName=
"xlink:href" from=
"" to=
"animated" dur=
"0.5s" begin=
"1s"
22 fill=
"freeze" id=
"animate"/>
24 <rect class=
"test" x=
"0" y=
"0" width=
"50" height=
"50">
25 <animateMotion begin=
"1" dur=
"1" fill=
"freeze">
26 <mpath id=
"mpath" xlink:
href=
"#moveFarAway">
27 <animate attributeName=
"xlink:href" from=
"#moveFarAway" to=
"#moveToUpperLeft" dur=
"0.5s" begin=
"1s"
35 <script class=
"testbody" type=
"text/javascript">
37 /** Test some strings are not animatable **/
39 /* Global Variables */
40 var svg = document.getElementById(
"svg");
41 var script = document.getElementById(
"script");
42 var mpath = document.getElementById(
"mpath");
43 var animate = document.getElementById(
"animate");
45 SimpleTest.waitForExplicitFinish();
48 ok(svg.animationsPaused(),
"should be paused by <svg> load handler");
49 is(svg.getCurrentTime(),
0,
"should be paused at 0 in <svg> load handler");
51 // Sanity check: check initial values
52 is(script.href.baseVal,
"",
"Unexpected initial script baseVal");
53 is(script.href.animVal,
"",
"Unexpected initial script animVal");
54 is(mpath.href.baseVal,
"#moveFarAway",
"Unexpected initial mpath baseVal");
55 is(mpath.href.animVal,
"#moveFarAway",
"Unexpected initial mpath animVal");
57 // Move to the end of the animation - should make no difference
58 svg.setCurrentTime(
2);
60 is(script.href.baseVal,
"",
"Unexpected value for script baseVal after animation");
61 is(script.href.animVal,
"",
"Unexpected value for script animVal after animation");
62 is(mpath.href.baseVal,
"#moveFarAway",
"Unexpected value for mpath baseVal after animation");
63 is(mpath.href.animVal,
"#moveFarAway",
"Unexpected value for mpath animVal after animation");
68 if (animate && animate.targetElement) {
69 window.addEventListener(
"load", main);
71 ok(true); // Skip tests but don't report 'todo' either