4 https://bugzilla.mozilla.org/show_bug.cgi?id=655297
7 <title>Test for Bug
655297</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=655297">Mozilla Bug
655297</a>
14 <div id=
"content" style=
"display: none">
17 <form>0</form> <form>1</form> <form>2</form> <form>3</form> <form>4</form>
18 <form>5</form> <form>6</form> <form>7</form> <form>8</form> <form>9</form>
20 <script type=
"application/javascript">
22 /** Test for Bug
655297 **/
24 var map = new WeakMap();
26 var paras = document.getElementsByTagName(
"form");
27 for (var i =
0; i < paras.length; i++)
28 map.set(paras[i],
"ok");
31 var paras = document.getElementsByTagName(
"form");
32 for (var i =
0; i < paras.length; i++) {
33 if (map.get(paras[i]) !=
"ok") {
41 SpecialPowers.forceGC();
42 ok(g(),
"Failed to keep XPCWrappedNative used as WeakMap key alive.");