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

Unified Diff: LayoutTests/fast/dom/processing-instruction-inherit-characterdata.xhtml

Issue 22911019: [DOM4] Have ProcessingInstruction inherit CharacterData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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: LayoutTests/fast/dom/processing-instruction-inherit-characterdata.xhtml
diff --git a/LayoutTests/fast/dom/processing-instruction-inherit-characterdata.xhtml b/LayoutTests/fast/dom/processing-instruction-inherit-characterdata.xhtml
new file mode 100644
index 0000000000000000000000000000000000000000..d607500c495f9a60cb16f0295615e30feaa9971b
--- /dev/null
+++ b/LayoutTests/fast/dom/processing-instruction-inherit-characterdata.xhtml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+<![CDATA[
+description("Test that ProcessingInstruction inherits from CharacterData");
+
+shouldBe("ProcessingInstruction.__proto__", "CharacterData");
+shouldBe("ProcessingInstruction.prototype.__proto__", "CharacterData.prototype");
+
+var processingInstruction = document.createProcessingInstruction("target", "data");
+shouldBe("processingInstruction.__proto__.__proto__", "CharacterData.prototype");
+
+shouldBeEqualToString("processingInstruction.target", "target");
+shouldBeEqualToString("processingInstruction.data", "data");
+shouldBe("processingInstruction.length", "4");
+
+processingInstruction.data = null;
+shouldBeEqualToString("processingInstruction.data", "");
+shouldBe("processingInstruction.length", "0");
+]]>
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698