Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / svg / custom / fill-SVGPaint-interface.svg
blob7f50db9d51ccdd07aa62b25ec398192cb3f5c2e1
1 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
3 <svg xmlns="http://www.w3.org/2000/svg" onload="runTest()">
5 <script>
6 <![CDATA[
7 function log(string) {
8 var newDiv = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
9 newDiv.textContent = string;
10 document.getElementById('log').appendChild(newDiv);
12 function runTest()
14 var rect = document.rootElement.lastChild.previousSibling;
15 if (rect.getPresentationAttribute('fill').toString() != "[object SVGPaint]") {
16 log("SVGPaint css property is not reported as of type SVGPaint");
17 return;
19 var fill = rect.getPresentationAttribute('fill');
20 fill.setRGBColor("green");
22 ]]>
23 </script>
24 This test tests that the type of the fill css attribute is correctly reported as SVGPaint.
25 See <a href="http://bugs.webkit.org/show_bug.cgi?id=14064">Bug 14064</a>.
26 <foreignObject>
27 <html xmlns="http://www.w3.org/1999/xhtml">
28 <div id="log">
29 This test tests that the type of the fill css attribute is correctly reported as SVGPaint.
30 See <a href="http://bugs.webkit.org/show_bug.cgi?id=14064">Bug 14064</a>.
31 </div>
32 </html>
33 </foreignObject>
35 <rect x="10" y="50" width="100" height="100" fill="red" style="color:yellow" border-top="10"/>
36 </svg>