1 description("Tests whether changes to SVG through native objects and the DOM stay in sync.");
3 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
4 var rect = svgDoc.createElementNS("http://www.w3.org/2000/svg", "rect");
5 rect.setAttribute("x", 100);
6 rect.setAttribute("y", 100);
8 shouldBe("rect.x.baseVal.value", "100");
9 shouldBe("rect.getAttribute('x')", "'100'");
10 shouldBe("rect.y.baseVal.value", "100");
11 shouldBe("rect.getAttribute('y')", "'100'");
13 rect.x.baseVal.value = 200;
14 rect.setAttribute("y", 200);
16 shouldBe("rect.x.baseVal.value", "200");
17 shouldBe("rect.getAttribute('x')", "'200'");
18 shouldBe("rect.y.baseVal.value", "200");
19 shouldBe("rect.getAttribute('y')", "'200'");
21 var successfullyParsed = true;