blob: 8a5d4c99b17bd5c771d9e21bc2ab1a7bcbf16307 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<iframe></iframe>
<div id="toBeMoved"></div>
<script>
description("ownerDocument of Attr should be set on setAttributeNode");
var elementToBeMoved = document.getElementById("toBeMoved");
iframeElement = document.getElementsByTagName("iframe")[0];
iframeDocument = iframeElement.contentWindow.document;
shouldBe('attr = iframeDocument.createAttribute("foo"); attr.ownerDocument', 'iframeDocument');
shouldBe('elementToBeMoved.setAttributeNode(attr); attr.ownerDocument', 'document');
shouldBe('iframeDocument.documentElement.appendChild(elementToBeMoved); attr.ownerDocument', 'iframeDocument');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>