blob: 544917fbc4a411a44deef6f27838f4fcfcdf683a [file] [log] [blame]
<!DOCTYPE html>
<html>
<script src="../../../resources/js-test-pre.js"></script>
<body>
<div id="div1"></div>
<div id="div2"></div>
<script>
description("Node.replaceChild() should throw a NotFoundError if child if not a child of parent");
var div1 = document.getElementById("div1");
var div2 = document.getElementById("div2");
var newNode = document.createElement("div");
shouldThrowErrorName("div1.replaceChild(newNode, div2)", "NotFoundError");
shouldThrowErrorName("div1.replaceChild(div2, div2)", "NotFoundError");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>