5 testRunner
.dumpAsText();
9 this.removeEventListener("DOMNodeRemoved", handler
, false);
10 doc
.adoptNode(this.parentElement
);
13 showFailure = function(s
)
15 document
.body
.innerHTML
= "FAILURE: " + s
;
18 window
.onload = function()
20 element1
= document
.createElement("x");
21 element2
= document
.createElement("x");
22 element3
= document
.createElement("x");
23 parent
= document
.createElement("x");
24 dummy
= document
.createElement("x");
26 doc
= document
.implementation
.createHTMLDocument();
28 parent
.appendChild(element1
);
29 element1
.addEventListener("DOMNodeRemoved", handler
, false);
31 document
.body
.appendChild(element1
);
33 if (element1
.ownerDocument
!= element1
.parentElement
.ownerDocument
)
34 return showFailure("appendChild");
36 document
.adoptNode(parent
);
37 parent
.appendChild(element2
);
39 doc
.body
.insertBefore(element2
, dummy
);
41 if (element2
.ownerDocument
!= element2
.parentElement
.ownerDocument
)
42 return showFailure("insertBefore");
44 parent
.appendChild(element3
);
46 doc
.body
.replaceChild(element3
, dummy
);
48 if (element3
.ownerDocument
!= element3
.parentElement
.ownerDocument
)
49 return showFailure("replaceChild");