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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/ChildNode/after.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/ChildNode/before.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/ChildNode/after.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/ChildNode/after.html b/third_party/WebKit/LayoutTests/fast/dom/ChildNode/after.html
index 77750e510e4ca3fb0f76264a430b4df7067d6fa5..984b4d3fbe50bf7234ee9660ad919eade3231b00 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/ChildNode/after.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/ChildNode/after.html
@@ -139,6 +139,14 @@ function test_after(nodeName) {
x.after(y);
assert_equals(x.nextSibling, null);
}, nodeName + '.after() on a child without any parent.');
+
+ test(function() {
+ var parent = document.createElement('div');
+ parent.appendChild(child);
+ var doc2 = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html");
+ assert_throws('HierarchyRequestError', () => { child.after(doc2, "foo") });
+ assert_equals(parent.firstChild, child);
+ }, nodeName + '.after() with a Document as an argument should throw.');
}
test_after('Comment');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/ChildNode/before.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698