| <!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] SVGForeignObjectElement-svgdom-height-prop.js |
| // [Expected rendering result] unclipped 'Test passed' text - and a series of PASS messages |
| |
| description("Tests dynamic updates of the 'height' 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", "2"); |
| |
| 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.height.baseVal.value", "2"); |
| |
| function repaintTest() { |
| foreignObjectElement.height.baseVal.value = 150; |
| shouldBe("foreignObjectElement.height.baseVal.value", "150"); |
| |
| completeTest(); |
| } |
| |
| var successfullyParsed = true; |
| </script> |
| </body> |
| </html> |