blob: d2df3b1706c501fba4450abbbe7ec7c12af21981 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="resources/SVGTestCase.js"></script>
<script src="../../resources/js-test-pre.js"></script>
<script src="../../fast/repaint/resources/repaint.js"></script>
</head>
<body onload="runRepaintTest()">
<h1>SVG 1.1 dynamic update tests</h1>
<p id="description"></p>
<div id="console"></div>
<script>
// [Name] SVGTextElement-dom-dx-attr.js
// [Expected rendering result] text message shifted to 0x20 - and a series of PASS message
description("Tests dynamic updates of the 'dx' attribute of the SVGTextElement object")
createSVGTestCase();
var textElement = createSVGElement("text");
textElement.textContent = "Text content";
textElement.setAttribute("x", "50");
textElement.setAttribute("y", "20");
textElement.setAttribute("dx", "0");
rootSVGElement.appendChild(textElement);
shouldBeEqualToString("textElement.getAttribute('dx')", "0");
function repaintTest() {
textElement.setAttribute("dx", "-50");
shouldBeEqualToString("textElement.getAttribute('dx')", "-50");
completeTest();
}
var successfullyParsed = true;
</script>
</body>
</html>