blob: 18e6baf7386b4752b1b94b9160975005b210a9cd [file] [log] [blame]
// [Name] SVGImageElement-dom-x-attr.js
// [Expected rendering result] image at 0x0 size 200x200 - and a series of PASS messages
description("Tests dynamic updates of the 'x' attribute of the SVGImageElement object")
createSVGTestCase();
var imageElement = createSVGElement("image");
imageElement.setAttributeNS(xlinkNS, "xlink:href", "../custom/resources/green-checker.png");
imageElement.setAttribute("preserveAspectRatio", "none");
imageElement.setAttribute("x", "-190");
imageElement.setAttribute("y", "0");
imageElement.setAttribute("width", "200");
imageElement.setAttribute("height", "200");
rootSVGElement.appendChild(imageElement);
shouldBeEqualToString("imageElement.getAttribute('x')", "-190");
function repaintTest() {
imageElement.setAttribute("x", "0");
shouldBeEqualToString("imageElement.getAttribute('x')", "0");
}
var successfullyParsed = true;