blob: 1057d8f4c79b4c8b53740d12dc5bdd0c45245c7f [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] SVGAElement-svgdom-target-prop.js
// [Expected rendering result] green 300x300 rectangle - created by resources/linkTarget.svg
// [Test purpose] If SVGAElement does not react properly on 'target' SVG DOM attribute changes
// a new window will be opened (target _blank, instead of _self) and
// notifyDone() is never called -> DRT will hang.
description("Tests dynamic updates of the 'target' property of the SVGAElement object")
createSVGTestCase();
var rectElement = createSVGElement("rect");
rectElement.setAttribute("width", "300");
rectElement.setAttribute("height", "300");
rectElement.setAttribute("fill", "red");
var anchorElement = createSVGElement("a");
anchorElement.setAttribute("target", "_blank");
anchorElement.setAttributeNS(xlinkNS, "xlink:href", "resources/linkTarget.svg");
anchorElement.appendChild(rectElement);
rootSVGElement.appendChild(anchorElement);
function repaintTest() {
anchorElement.target.baseVal = "_self";
clickAt(150, 200);
}
var successfullyParsed = true;
</script>
</body>
</html>