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