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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/ParentNode/prepend.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/prepend.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/ParentNode/prepend.html b/third_party/WebKit/LayoutTests/fast/dom/ParentNode/prepend.html
index 17dd962af66b12ad76a0cf193e18b6db0d614708..7931cf443cc64265c708c24f1718df479e364432 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/ParentNode/prepend.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/ParentNode/prepend.html
@@ -79,6 +79,13 @@ function test_prepend(node, nodeName) {
assert_equals(parent.childNodes[1].textContent, 'text');
assert_equals(parent.childNodes[2], child);
}, nodeName + '.prepend() 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.prepend(doc2, "foo") });
+ assert_equals(parent.firstChild, null);
+ }, nodeName + '.prepend() with a Document as an argument should throw.');
}
test_prepend(document.createElement('div'), 'Element');
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/ParentNode/append.html ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698