Reviewed by Darin.
[WebKit-https.git] / LayoutTests / fast / xpath / 4XPath / Borrowed / kd_20010423.html
1 <!-- https://sourceforge.net/tracker/?func=detail&atid=106473&aid=418317&group_id=6473 -->
2 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
3 <html>
4 <head>
5 <link rel="stylesheet" href="../../../js/resources/js-test-style.css">
6 <script src="../../../js/resources/js-test-pre.js"></script>
7 </head>
8 <body>
9 <div id="console"></div>
10
11 <script>
12 SRC_1 = '<?xml version="1.0" encoding="utf-8"?>\
13 <doc>\
14 <elem>abc</elem>\
15 <elem><![CDATA[abc]]></elem>\
16 <elem>a<![CDATA[b]]>c</elem>\
17 </doc>';
18
19     doc = (new DOMParser).parseFromString(SRC_1, "application/xml");
20
21     EXPR = '/doc/elem/text()'
22     nodeset = doc.evaluate(EXPR, doc, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
23     actual = "";
24     while (currNode = nodeset.iterateNext())
25         actual += currNode.nodeValue;
26     
27     // In the original 4Suite test, the expectation was "abcabcabc". I believe it was wrong.
28     shouldBe('actual', '"abcabca"')
29
30     var successfullyParsed = true;
31
32 </script>
33 <script src="../../../js/resources/js-test-post.js"></script>
34 </body>
35 </html>