2 <svg xmlns=
"http://www.w3.org/2000/svg" id=
"svg" width=
"600" height=
"400">
3 <foreignObject width=
"100%" height=
"100%">
4 <html xmlns=
"http://www.w3.org/1999/xhtml">
6 This tests to make sure that baseVal and animVal are tied when animation is not enabled:
10 <script type=
"text/javascript">
12 if (window.testRunner)
13 window.testRunner.dumpAsText();
15 function log(message) {
16 var logDiv = document.getElementById('log');
17 var newDiv = document.createElementNS(
"http://www.w3.org/1999/xhtml",'div');
18 newDiv.appendChild(document.createTextNode(message));
19 logDiv.appendChild(newDiv);
21 var svg = document.getElementById('svg');
22 if (svg.x && svg.x.baseVal && svg.x.animVal) {
23 log(
"svg.x.baseVal.value = " + svg.x.baseVal.value);
24 log(
"svg.x.animVal.value = " + svg.x.animVal.value);
25 log(
"setting svg.x.baseVal.value = 10");
26 svg.x.baseVal.value =
10;
27 log(
"svg.x.baseVal.value = " + svg.x.baseVal.value);
28 log(
"svg.x.animVal.value = " + svg.x.animVal.value);
29 if ((svg.x.baseVal.value == svg.x.animVal.value) && (svg.x.animVal.value ==
10))
30 log(
"SUCCESS (1 of 2)");
33 log(
"setting svg.x.animVal.value = 5");
35 svg.x.animVal.value =
5;
37 log(
"caught exception: " + e.message);
39 log(
"svg.x.baseVal.value = " + svg.x.baseVal.value);
40 log(
"svg.x.animVal.value = " + svg.x.animVal.value);
41 if ((svg.x.baseVal.value == svg.x.animVal.value) && (svg.x.animVal.value ==
10))
42 log(
"SUCCESS (2 of 2)");
46 log(
"FAILED, svg.x, svg.x.baseVal or svg.x.animVal undefined.")