haikuwebkit/LayoutTests/fast/dom/processing-instruction-appe...

18 lines
660 B
HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
<![CDATA[
description("Test that appropriate exceptions are thrown when adding children to a ProcessingInstruction.");
var pi = document.createProcessingInstruction('target', 'data');
shouldThrow("pi.appendChild(null)");
var div = document.createElement('div');
shouldThrowErrorName("pi.appendChild(div)", "HierarchyRequestError");
var textNode = document.createTextNode('sometext');
shouldThrowErrorName("pi.appendChild(textNode)", "HierarchyRequestError");
]]>
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>