Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html

Issue 17583003: Set Attr.ownerDocument in Element#setAttributeNode() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html
diff --git a/LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html b/LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..a301ebd201b5abb5869d83d5a0dde94159fa09ba
--- /dev/null
+++ b/LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<iframe></iframe>
+<div id="toBeMoved"></div>
+<script>
+description("ownerNode of Attr should be set on setAttributeNode");
tkent 2013/06/24 05:06:37 ownerNode -> ownerDocument
+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>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe-expected.txt » ('j') | Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698