diff --git a/tests/wpt/dom/nodes/Document-adoptNode.html b/tests/wpt/dom/nodes/Document-adoptNode.html
new file mode 100644
index 00000000..60a4e677
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-adoptNode.html
@@ -0,0 +1,50 @@
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-createCDATASection-xhtml.xhtml b/tests/wpt/dom/nodes/Document-createCDATASection-xhtml.xhtml
new file mode 100644
index 00000000..b0a5a7f2
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createCDATASection-xhtml.xhtml
@@ -0,0 +1,22 @@
+
+
+
+
+
document.createCDATASection
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-createCDATASection.html b/tests/wpt/dom/nodes/Document-createCDATASection.html
new file mode 100644
index 00000000..72b3684c
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createCDATASection.html
@@ -0,0 +1,16 @@
+
+
+
document.createCDATASection must throw in HTML documents
+
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-createComment-createTextNode.js b/tests/wpt/dom/nodes/Document-createComment-createTextNode.js
new file mode 100644
index 00000000..62a38d38
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createComment-createTextNode.js
@@ -0,0 +1,22 @@
+function test_create(method, iface, nodeType, nodeName) {
+ ["\u000b", "a -- b", "a-", "-b", null, undefined].forEach(function(value) {
+ test(function() {
+ var c = document[method](value);
+ var expected = String(value);
+ assert_true(c instanceof iface);
+ assert_true(c instanceof CharacterData);
+ assert_true(c instanceof Node);
+ assert_equals(c.ownerDocument, document);
+ assert_equals(c.data, expected, "data");
+ assert_equals(c.nodeValue, expected, "nodeValue");
+ assert_equals(c.textContent, expected, "textContent");
+ assert_equals(c.length, expected.length);
+ assert_equals(c.nodeType, nodeType);
+ assert_equals(c.nodeName, nodeName);
+ assert_equals(c.hasChildNodes(), false);
+ assert_equals(c.childNodes.length, 0);
+ assert_equals(c.firstChild, null);
+ assert_equals(c.lastChild, null);
+ }, method + "(" + format_value(value) + ")");
+ });
+}
diff --git a/tests/wpt/dom/nodes/Document-createComment.html b/tests/wpt/dom/nodes/Document-createComment.html
new file mode 100644
index 00000000..a175c3a2
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createComment.html
@@ -0,0 +1,21 @@
+
+
+
Document.createComment
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-createProcessingInstruction-xhtml.xhtml b/tests/wpt/dom/nodes/Document-createProcessingInstruction-xhtml.xhtml
new file mode 100644
index 00000000..d06f70fd
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createProcessingInstruction-xhtml.xhtml
@@ -0,0 +1,15 @@
+
+
+
Document.createProcessingInstruction in XML documents
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-createProcessingInstruction.html b/tests/wpt/dom/nodes/Document-createProcessingInstruction.html
new file mode 100644
index 00000000..c57a792f
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createProcessingInstruction.html
@@ -0,0 +1,11 @@
+
+
+
Document.createProcessingInstruction in HTML documents
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-createProcessingInstruction.js b/tests/wpt/dom/nodes/Document-createProcessingInstruction.js
new file mode 100644
index 00000000..d6cc3725
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createProcessingInstruction.js
@@ -0,0 +1,39 @@
+test(function() {
+ var invalid = [
+ ["A", "?>"],
+ ["\u00B7A", "x"],
+ ["\u00D7A", "x"],
+ ["A\u00D7", "x"],
+ ["\\A", "x"],
+ ["\f", "x"],
+ [0, "x"],
+ ["0", "x"]
+ ],
+ valid = [
+ ["xml:fail", "x"],
+ ["A\u00B7A", "x"],
+ ["a0", "x"]
+ ]
+
+ for (var i = 0, il = invalid.length; i < il; i++) {
+ test(function() {
+ assert_throws_dom("INVALID_CHARACTER_ERR", function() {
+ document.createProcessingInstruction(invalid[i][0], invalid[i][1])
+ })
+ }, "Should throw an INVALID_CHARACTER_ERR for target " +
+ format_value(invalid[i][0]) + " and data " +
+ format_value(invalid[i][1]) + ".")
+ }
+ for (var i = 0, il = valid.length; i < il; ++i) {
+ test(function() {
+ var pi = document.createProcessingInstruction(valid[i][0], valid[i][1]);
+ assert_equals(pi.target, valid[i][0]);
+ assert_equals(pi.data, valid[i][1]);
+ assert_equals(pi.ownerDocument, document);
+ assert_true(pi instanceof ProcessingInstruction);
+ assert_true(pi instanceof Node);
+ }, "Should get a ProcessingInstruction for target " +
+ format_value(valid[i][0]) + " and data " +
+ format_value(valid[i][1]) + ".")
+ }
+})
diff --git a/tests/wpt/dom/nodes/Document-createTextNode.html b/tests/wpt/dom/nodes/Document-createTextNode.html
new file mode 100644
index 00000000..ccc1b1b7
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-createTextNode.html
@@ -0,0 +1,21 @@
+
+
+
Document.createTextNode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/dom/nodes/Document-importNode.html b/tests/wpt/dom/nodes/Document-importNode.html
new file mode 100644
index 00000000..d27cce6c
--- /dev/null
+++ b/tests/wpt/dom/nodes/Document-importNode.html
@@ -0,0 +1,67 @@
+
+
+
Document.importNode
+
+
+
+
+