test_SVG_namespace_ids.html (3490B)
1 <!DOCTYPE html> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=589640 5 --> 6 <head> 7 <title>Test for Bug 589640</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 <script class="testbody" type="application/javascript"> 11 SimpleTest.waitForExplicitFinish(); 12 13 function debug(message) { 14 document.getElementById("debug").appendChild(document.createTextNode(message + "\n")); 15 } 16 17 function runTests() { 18 var svg = document.getElementById("svg1"); 19 for (var el = 0; el < svg.children.length; el++) { 20 is(svg.children[el].id, svg.children[el].localName, svg.children[el].localName + " in the SVG namespace has a valid ID"); 21 debug(svg.children[el].localName + ".id = " + svg.children[el].id); 22 } 23 24 SimpleTest.finish(); 25 } 26 </script> 27 </head> 28 <body onload="runTests()"> 29 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=589640">Mozilla Bug 589640</a> 30 <pre id="debug"></pre> 31 <!-- NOTE: This test relies on the ids being the same as the element names --> 32 <svg id="svg1"> 33 <a id="a" /> 34 <animate id="animate" /> 35 <animateColor id="animateColor" /> 36 <animateMotion id="animateMotion" /> 37 <animateTransform id="animateTransform" /> 38 <circle id="circle" /> 39 <clipPath id="clipPath" /> 40 <color-profile id="color-profile" /> 41 <cursor id="cursor" /> 42 <defs id="defs" /> 43 <desc id="desc" /> 44 <ellipse id="ellipse" /> 45 <feBlend id="feBlend" /> 46 <feColorMatrix id="feColorMatrix" /> 47 <feComponentTransfer id="feComponentTransfer" /> 48 <feComposite id="feComposite" /> 49 <feConvolveMatrix id="feConvolveMatrix" /> 50 <feDiffuseLighting id="feDiffuseLighting" /> 51 <feDisplacementMap id="feDisplacementMap" /> 52 <feDistantLight id="feDistantLight" /> 53 <feDropShadow id="feDropShadow" /> 54 <feFlood id="feFlood" /> 55 <feFuncA id="feFuncA" /> 56 <feFuncB id="feFuncB" /> 57 <feFuncG id="feFuncG" /> 58 <feFuncR id="feFuncR" /> 59 <feGaussianBlur id="feGaussianBlur" /> 60 <feImage id="feImage" /> 61 <feMerge id="feMerge" /> 62 <feMergeNode id="feMergeNode" /> 63 <feMorphology id="feMorphology" /> 64 <feOffset id="feOffset" /> 65 <fePointLight id="fePointLight" /> 66 <feSpecularLighting id="feSpecularLighting" /> 67 <feSpotLight id="feSpotLight" /> 68 <feTile id="feTile" /> 69 <feTurbulence id="feTurbulence" /> 70 <filter id="filter" /> 71 <font id="font" /> 72 <font-face id="font-face" /> 73 <font-face-format id="font-face-format" /> 74 <font-face-name id="font-face-name" /> 75 <font-face-src id="font-face-src" /> 76 <font-face-uri id="font-face-uri" /> 77 <foreignObject id="foreignObject" /> 78 <g id="g" /> 79 <glyph id="glyph" /> 80 <glyphRef id="glyphRef" /> 81 <hkern id="hkern" /> 82 <image id="image" /> 83 <line id="line" /> 84 <linearGradient id="linearGradient" /> 85 <marker id="marker" /> 86 <mask id="mask" /> 87 <metadata id="metadata" /> 88 <missing-glyph id="missing-glyph" /> 89 <mpath id="mpath" /> 90 <path id="path" /> 91 <pattern id="pattern" /> 92 <polygon id="polygon" /> 93 <polyline id="polyline" /> 94 <radialGradient id="radialGradient" /> 95 <rect id="rect" /> 96 <script id="script" /> 97 <set id="set" /> 98 <stop id="stop" /> 99 <style id="style" /> 100 <svg id="svg" /> 101 <switch id="switch" /> 102 <symbol id="symbol" /> 103 <text id="text" /> 104 <textPath id="textPath" /> 105 <title id="title" /> 106 <tref id="tref" /> 107 <tspan id="tspan" /> 108 <use id="use" /> 109 <view id="view" /> 110 <vkern id="vkern" /> 111 </svg> 112 </body> 113 </html>