summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html')
-rw-r--r--LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html b/LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html
new file mode 100644
index 0000000..6a80e2b
--- /dev/null
+++ b/LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html
@@ -0,0 +1,36 @@
+<!-- https://sourceforge.net/tracker/?func=detail&atid=106473&aid=418317&group_id=6473 -->
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js/resources/js-test-style.css">
+<script src="../../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="console"></div>
+
+<script>
+SRC_1 = '<?xml version="1.0" encoding="utf-8"?>\
+<doc>\
+<elem>abc</elem>\
+<elem><![CDATA[abc]]></elem>\
+<elem>a<![CDATA[b]]>c</elem>\
+</doc>';
+
+ doc = (new DOMParser).parseFromString(SRC_1, "application/xml");
+
+ EXPR = '/doc/elem/text()'
+ nodeset = doc.evaluate(EXPR, doc, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
+ actual = "";
+ while (currNode = nodeset.iterateNext())
+ actual += currNode.nodeValue;
+
+ // According to DOM XPath working group note, this should be "abcabca", but we'll rather match Firefox.
+ // See <http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#TextNodes>.
+ shouldBe('actual', '"abcabcabc"')
+
+ var successfullyParsed = true;
+
+</script>
+<script src="../../../js/resources/js-test-post.js"></script>
+</body>
+</html>