1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=468210
6 <title>Test for Bug
468210</title>
7 <script type=
"application/javascript" src=
"/MochiKit/packed.js"></script>
8 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <!-- Keep the stuff inside <content> without spaces, so that the getAnonymousNodes works right -->
11 <bindings xmlns=
"http://www.mozilla.org/xbl">
13 <content><span xmlns='http://www.w3.org/
1999/xhtml'
><children xmlns=
"http://www.mozilla.org/xbl"/></span></content>
18 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=468210">Mozilla Bug
468210</a>
20 <div id=
"d" style=
"-moz-binding: url(#foo);"></div>
23 <div id=
"content" style=
"display: none">
27 <script type=
"application/javascript">
30 /** Test for Bug
468210 **/
31 SimpleTest.waitForExplicitFinish();
32 addLoadEvent(function() {
34 var n = document.anchors.length;
35 is(n,
1,
"Unexpected number of anchors");
36 var anon = document.getAnonymousNodes(div)[
0];
37 is(anon instanceof HTMLSpanElement, true,
"Unexpected node");
38 is(anon.parentNode, div,
"Unexpected parent");
39 document.body.appendChild(div);
40 is(anon.parentNode, null,
"Parent should have become null");
41 // An attr set to test notifications
42 anon.setAttribute(
"h",
"i");
44 addLoadEvent(SimpleTest.finish);