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

Unified Diff: LayoutTests/fast/dom/Node/script-tests/initial-values.js

Issue 100433004: Sync Document.createProcessingInstruction() with spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test createProcessingInstruction for HTML doc Created 7 years 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 | « LayoutTests/fast/dom/Node/initial-values-expected.txt ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Node/script-tests/initial-values.js
diff --git a/LayoutTests/fast/dom/Node/script-tests/initial-values.js b/LayoutTests/fast/dom/Node/script-tests/initial-values.js
index 926dedc915dd56bcd5766883d394e19f7331d4b9..4c404b57b966c3af2cdd2bc0861f6e720de5234b 100644
--- a/LayoutTests/fast/dom/Node/script-tests/initial-values.js
+++ b/LayoutTests/fast/dom/Node/script-tests/initial-values.js
@@ -156,10 +156,8 @@ shouldBe("element.prefix", "'html'");
shouldBe("element.nodeValue", "null");
shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'");
-// Not possible to create Notation nodes via the DOM, WebKit doesn't create them from parsing
-
-shouldThrow("document.createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=\"missing.xsl\"')");
-var processingInstruction = xmlDoc.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="missing.xsl"');
+debug("Processing instruction creation using createProcessingInstruction on an HTML doc:")
+var processingInstruction = document.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="missing.xsl"');
shouldBe("processingInstruction.nodeName", "'xml-stylesheet'");
shouldBe("processingInstruction.localName", "null");
shouldBe("processingInstruction.namespaceURI", "null");
@@ -172,6 +170,17 @@ shouldBe("processingInstruction.nodeValue", "'type=\"text/xsl\" href=\"missing.x
shouldBe("processingInstruction.target", "'xml-stylesheet'");
shouldBe("processingInstruction.data", "'type=\"text/xsl\" href=\"missing.xsl\"'");
+debug("Processing instruction creation using createProcessingInstruction on an XHTML doc:")
+processingInstruction = xmlDoc.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="missing.xsl"');
+shouldBe("processingInstruction.nodeName", "'xml-stylesheet'");
+shouldBe("processingInstruction.localName", "null");
+shouldBe("processingInstruction.namespaceURI", "null");
+shouldBe("processingInstruction.prefix", "null");
+shouldBe("processingInstruction.nodeValue", "'type=\"text/xsl\" href=\"missing.xsl\"'");
+shouldBe("processingInstruction.target", "'xml-stylesheet'");
+shouldBe("processingInstruction.data", "'type=\"text/xsl\" href=\"missing.xsl\"'");
+
+debug("Text node creation using createTextNode on an HTML doc:")
var text = document.createTextNode("foo");
shouldBe("text.nodeName", "'#text'");
shouldBe("text.localName", "null");
« no previous file with comments | « LayoutTests/fast/dom/Node/initial-values-expected.txt ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698