blob: e0e6666942f0ae063f7e8c3902335a75b1f3e9df [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>