zimmermann@webkit.org | e138811 | 2008-08-12 10:27:53 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
zimmermann@webkit.org | e138811 | 2008-08-12 10:27:53 +0000 | [diff] [blame] | 4 | <script src="resources/SVGTestCase.js"></script> |
mark.lam@apple.com | 1ca737d | 2013-09-08 05:29:22 +0000 | [diff] [blame] | 5 | <script src="../../resources/js-test-pre.js"></script> |
zimmermann@webkit.org | 8567f8d | 2012-02-15 10:48:58 +0000 | [diff] [blame] | 6 | <script src="../../fast/repaint/resources/repaint.js"></script> |
zimmermann@webkit.org | e138811 | 2008-08-12 10:27:53 +0000 | [diff] [blame] | 7 | </head> |
zimmermann@webkit.org | 8567f8d | 2012-02-15 10:48:58 +0000 | [diff] [blame] | 8 | <body onload="runRepaintTest()"> |
zimmermann@webkit.org | e138811 | 2008-08-12 10:27:53 +0000 | [diff] [blame] | 9 | <h1>SVG 1.1 dynamic update tests</h1> |
| 10 | <p id="description"></p> |
| 11 | <div id="console"></div> |
ap@apple.com | 92352d0 | 2017-05-24 22:53:00 +0000 | [diff] [blame] | 12 | <script> |
| 13 | // [Name] SVGImageElement-svgdom-width-prop.js |
| 14 | // [Expected rendering result] image at 0x0 size 200x200 - and a series of PASS messages |
| 15 | |
| 16 | description("Tests dynamic updates of the 'width' property of the SVGImageElement object") |
| 17 | createSVGTestCase(); |
| 18 | |
| 19 | var imageElement = createSVGElement("image"); |
| 20 | imageElement.setAttributeNS(xlinkNS, "xlink:href", "../custom/resources/green-checker.png"); |
| 21 | imageElement.setAttribute("preserveAspectRatio", "none"); |
| 22 | imageElement.setAttribute("x", "0"); |
| 23 | imageElement.setAttribute("y", "0"); |
| 24 | imageElement.setAttribute("width", "100"); |
| 25 | imageElement.setAttribute("height", "200"); |
| 26 | rootSVGElement.appendChild(imageElement); |
| 27 | |
| 28 | shouldBe("imageElement.width.baseVal.value", "100"); |
| 29 | |
| 30 | function repaintTest() { |
| 31 | imageElement.width.baseVal.value = 200; |
| 32 | shouldBe("imageElement.width.baseVal.value", "200"); |
| 33 | |
| 34 | completeTest(); |
| 35 | } |
| 36 | |
| 37 | var successfullyParsed = true; |
| 38 | </script> |
zimmermann@webkit.org | e138811 | 2008-08-12 10:27:53 +0000 | [diff] [blame] | 39 | </body> |
| 40 | </html> |