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 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) {
23 var elem = document.createElementNS(
"http://www.w3.org/2000/svg", localName);
25 elem.addEventListener(
"click", function() {});
27 var propVal = elem[prop];
28 Object.prototype.valueOf[prop +
"_expando"] = propVal;
29 if (propVal instanceof SVGAnimatedAngle || propVal instanceof SVGAnimatedLength ||
30 propVal instanceof SVGAnimatedRect || propVal instanceof SVGAnimatedPreserveAspectRatio) {
31 Object.prototype.valueOf[prop +
"_baseVal_expando"] = propVal.baseVal;
32 Object.prototype.valueOf[prop +
"_animVal_expando"] = propVal.animVal;
37 storeSVGPropertyAsExpando(
"marker",
"class");
40 storeSVGPropertyAsExpando(
"marker",
"orientAngle");
43 storeSVGPropertyAsExpando(
"marker",
"viewBox");
45 // preserveAspectRatio
46 storeSVGPropertyAsExpando(
"marker",
"preserveAspectRatio");
49 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"preserveAlpha");
52 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"edgeMode");
54 // special marker enum
55 storeSVGPropertyAsExpando(
"marker",
"orientType");
58 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"orderX");
61 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"x");
64 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"divisor");
67 storeSVGPropertyAsExpando(
"feConvolveMatrix",
"in1");
69 var elem1 = document.createElementNS(
"http://www.w3.org/2000/svg",
"switch");
70 var elem2 = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect");
71 elem1.appendChild(elem2);
72 document.getElementById(
"content").appendChild(elem1);
74 elem2.addEventListener(
"click", function() {});
76 Object.prototype.valueOf.expando = elem1;
78 ok(true,
"SVG shouldn't leak.");