summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217.html')
-rw-r--r--LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217.html b/LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217.html
new file mode 100644
index 0000000..207c3ab
--- /dev/null
+++ b/LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217.html
@@ -0,0 +1,32 @@
+<!-- http://lists.fourthought.com/pipermail/4suite/2002-December/004771.html -->
+<!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>
+ DOC1 = '<a><b><c/><d/></b></a>'
+
+ doc = (new DOMParser).parseFromString(DOC1, "application/xml");
+ nodeset = doc.evaluate('.//*', doc.documentElement, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
+ node_names = "";
+ while (currNode = nodeset.iterateNext())
+ node_names += currNode.nodeName;
+ shouldBe('node_names', '"bcd"')
+
+ nodeset = doc.evaluate('(.//*)[1]', doc.documentElement, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
+ node_names = "";
+ while (currNode = nodeset.iterateNext())
+ node_names += currNode.nodeName;
+ shouldBe('node_names', '"b"')
+
+ var successfullyParsed = true;
+
+</script>
+<script src="../../../js/resources/js-test-post.js"></script>
+</body>
+</html>