40 lines
1.2 KiB
HTML
40 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] SVGRectElement-dom-height-attr.js
|
|
// [Expected rendering result] green rect size 200x200 at 0x0 - and a series of PASS messages
|
|
|
|
description("Tests dynamic updates of the 'height' attribute of the SVGRectElement object")
|
|
createSVGTestCase();
|
|
|
|
var rectElement = createSVGElement("rect");
|
|
rectElement.setAttribute("x", "0");
|
|
rectElement.setAttribute("y", "0");
|
|
rectElement.setAttribute("width", "200");
|
|
rectElement.setAttribute("height", "50");
|
|
rectElement.setAttribute("fill", "green");
|
|
|
|
rootSVGElement.appendChild(rectElement);
|
|
shouldBeEqualToString("rectElement.getAttribute('height')", "50");
|
|
|
|
function repaintTest() {
|
|
rectElement.setAttribute("height", "200");
|
|
shouldBeEqualToString("rectElement.getAttribute('height')", "200");
|
|
|
|
completeTest();
|
|
}
|
|
|
|
var successfullyParsed = true;
|
|
</script>
|
|
</body>
|
|
</html>
|