blob: 5a54140b91bd2c9526128d433d3575c07fb95320 [file] [log] [blame]
// [Name] SVGForeignObjectElement-svgdom-x-prop.js
// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
description("Tests dynamic updates of the 'x' property of the SVGForeignObjectElement object")
createSVGTestCase();
var foreignObjectElement = createSVGElement("foreignObject");
foreignObjectElement.setAttribute("x", "-100");
foreignObjectElement.setAttribute("y", "80");
foreignObjectElement.setAttribute("width", "150");
foreignObjectElement.setAttribute("height", "150");
var htmlDivElement = document.createElementNS(xhtmlNS, "xhtml:div");
htmlDivElement.setAttribute("style", "background-color: green; color: white; text-align: center");
htmlDivElement.textContent = "Test passed";
foreignObjectElement.appendChild(htmlDivElement);
rootSVGElement.appendChild(foreignObjectElement);
shouldBe("foreignObjectElement.x.baseVal.value", "-100");
function executeTest() {
foreignObjectElement.x.baseVal.value = "100";
shouldBe("foreignObjectElement.x.baseVal.value", "100");
waitForClickEvent(foreignObjectElement);
triggerUpdate();
}
executeTest();
var successfullyParsed = true;