blob: f9d8127633372359a331dd2b4b20ccb9ad48d5ef [file] [log] [blame]
<!DOCTYPE html>
<p>This is a test to verify that importNode of a CDATASection on a HTML Document works.
<div id="output"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var output = document.getElementById('output');
var p = new DOMParser();
var doc = p.parseFromString('<root><![CDATA[ ]]></root>', "application/xml");
try {
var node = document.importNode(doc.documentElement, true);
if (node.firstChild.ownerDocument != document) {
output.textContent = "FAILED because imported CDATASection has wrong owner document\n";
} else {
output.textContent = "PASSED\n";
}
} catch (e) {
output.textContent = "FAILED with exception " + e + "\n";
}
</script>