blob: d0b9e9f4ebf771a2870155203e75ad203b92131c [file] [log] [blame]
// [Name] SVGCursorElement-svgdom-y-prop.js
// [Expected rendering result] cursor image should hang from the upper-left corner of the cursor after clicking - and a series of PASS mesasges
description("Tests dynamic updates of the 'y' property of the SVGCursorElement object")
createSVGTestCase();
var cursorElement = createSVGElement("cursor");
cursorElement.setAttribute("id", "cursor");
cursorElement.setAttribute("y", "100");
cursorElement.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/sphere.png");
rootSVGElement.appendChild(cursorElement);
var rectElement = createSVGElement("rect");
rectElement.setAttribute("cursor", "url(#cursor)");
rectElement.setAttribute("width", "200");
rectElement.setAttribute("height", "200");
rectElement.setAttribute("fill", "green");
rootSVGElement.appendChild(rectElement);
shouldBe("cursorElement.y.baseVal.value", "100");
function executeTest() {
cursorElement.y.baseVal.value = 0;
shouldBe("cursorElement.y.baseVal.value", "0");
completeTest();
}
startTest(rectElement, 150, 150);
var successfullyParsed = true;