blob: 3a0a1483c00ad6709e7643c88ad65eafc741ee13 [file] [log] [blame]
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
try {
var xmld = new DOMParser().parseFromString( "<doc/>", "text/xml");
var fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode("1"));
fragment.appendChild(document.createTextNode("2"));
var importedFragment = xmld.importNode(fragment, true);
xmld.firstChild.appendChild(importedFragment);
if (xmld.firstChild.textContent != "12")
throw "wrong imported DOM tree: '" + xmld.firstChild.textContent + "'";
document.write("<div>SUCCESS</div>");
} catch (ex) {
document.write("<div>" + ex + "</div>");
}
</script>