2009-08-06 20:26:33 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=502959
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 502959</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=502959">Mozilla Bug 502959</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 502959 **/
|
2011-09-29 09:06:35 -07:00
|
|
|
// Whatever you do don't use the word "wrapped" in this function.
|
|
|
|
function foo() {
|
|
|
|
ok(true, "Able to call the function");
|
|
|
|
}
|
|
|
|
|
|
|
|
var iter = document.createNodeIterator(document, NodeFilter.SHOW_ELEMENT, foo, false);
|
|
|
|
var doublewrapped = iter.filter;
|
2009-08-06 20:26:33 -07:00
|
|
|
|
|
|
|
ok(doublewrapped.toString().indexOf("wrapped") > 0, "got a double-wrapped object back");
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
|
Components.utils.forceGC();
|
|
|
|
})();
|
|
|
|
|
2011-09-29 09:06:35 -07:00
|
|
|
doublewrapped.acceptNode(document);
|
2009-08-06 20:26:33 -07:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|