blob: 954697095855d032ec9af558ed0516952a30849f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests setting document.body");
iframe1 = document.createElement('iframe');
document.body.appendChild(iframe1);
document1 = iframe1.contentDocument.implementation.createHTMLDocument("document");
shouldThrow("document1.body = iframe1", "'Error: HIERARCHY_REQUEST_ERR: DOM Exception 3'");
shouldBe("iframe1.parentNode", "document.body");
shouldThrow("document1.body = document1.createElement('iframe')", "'Error: HIERARCHY_REQUEST_ERR: DOM Exception 3'");
document1.body = document.body;
shouldBeTrue("document1.body != document.body");
body1 = document1.createElement('body');
document1.body = body1;
shouldBe("document1.body", "body1")
var successfullyParsed = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>