38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
<!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-svgdom-transform-prop.js
|
|
// [Expected rendering result] 'Test passed' message - and a series of PASS messages
|
|
description("Tests dynamic updates of the 'transform' property of the SVGTextElement object")
|
|
createSVGTestCase();
|
|
|
|
var textElement = createSVGElement("text");
|
|
textElement.setAttribute("x", "0");
|
|
textElement.setAttribute("y", "215");
|
|
textElement.setAttribute("transform", "translate(0,0)");
|
|
textElement.textContent = "Text content";
|
|
rootSVGElement.appendChild(textElement);
|
|
|
|
shouldBe("textElement.transform.baseVal.getItem(0).matrix.f", "0.0");
|
|
|
|
function repaintTest() {
|
|
textElement.transform.baseVal.getItem(0).matrix.f = -200;
|
|
shouldBe("textElement.transform.baseVal.getItem(0).matrix.f", "-200.0");
|
|
|
|
completeTest();
|
|
}
|
|
|
|
var successfullyParsed = true;
|
|
</script>
|
|
</body>
|
|
</html>
|