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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html

Issue 2305903003: DOM append(), prepend(), after(), before(), and replaceWith() should throw an exception if a Docume… (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html b/third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html
index ad894c00b2155cd8f6b4b18b62114aa18332eb20..b302d5a7cfc1eeee8c19eda91d7d431fdf608384 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html
@@ -79,6 +79,13 @@ function test_append(node, nodeName) {
assert_equals(parent.childNodes[1], x);
assert_equals(parent.childNodes[2].textContent, 'text');
}, nodeName + '.append() with one element and text as argument, on a parent having a child.');
+
+ test(function() {
+ var parent = node.cloneNode();
+ var doc2 = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html");
+ assert_throws('HierarchyRequestError', () => { parent.append(doc2, "foo") });
+ assert_equals(parent.firstChild, null);
+ }, nodeName + '.append() with a Document as an argument should throw.');
}
test_append(document.createElement('div'), 'Element');

Powered by Google App Engine
This is Rietveld 408576698