1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=467671
6 <title>Test for Bug
467671</title>
7 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=467671">Mozilla Bug
467671</a>
13 <div id=
"content" style=
"display: none">
17 <script type=
"application/javascript">
20 /** Test for Bug
467671 **/
22 function storeSVGPropertyAsExpando(localName, prop)
24 var elem = document.createElementNS(
"http://www.w3.org/2000/svg", localName);
26 elem.addEventListener(
"click", function(){}, false);
28 var propVal = elem[prop];
29 Object.prototype.toSource[prop +
"_expando"] = propVal;
30 if (propVal instanceof SVGAnimatedAngle || propVal instanceof SVGAnimatedLength ||
31 propVal instanceof SVGAnimatedRect || propVal instanceof SVGAnimatedPreserveAspectRatio) {
32 Object.prototype.toSource[prop +
"_baseVal_expando"] = propVal.baseVal;
33 Object.prototype.toSource[prop +
"_animVal_expando"] = propVal.animVal;
38 storeSVGPropertyAsExpando(
"marker",
"class");
41 storeSVGPropertyAsExpando(
"marker",
"orientAngle");
44 storeSVGPropertyAsExpando(
"marker",
"viewBox");
46 // preserveAspectRatio
47 storeSVGPropertyAsExpando(
"marker",
"preserveAspectRatio");
50 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"preserveAlpha");
53 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"edgeMode");
55 // special marker enum
56 storeSVGPropertyAsExpando(
"marker",
"orientType");
59 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"orderX");
62 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"x");
65 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"divisor");
68 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"in1");
70 var elem1 = document.createElementNS(
"http://www.w3.org/2000/svg",
"switch");
71 var elem2 = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect");
72 elem1.appendChild(elem2);
73 document.getElementById(
"content").appendChild(elem1);
75 elem2.addEventListener(
"click", function(){}, false);
77 Object.prototype.toSource.expando = elem1;
79 ok(true,
"SVG shouldn't leak.");