Test LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html Detail
- id
- LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html
- type
- layouttest
- version
- 0
- enabled
- 1
- tags
- flags
- sections
-
- url
- http://localhost:8888/LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html
- file
- LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423.html
- results
-
Layouttest detail
expected:
PASS actual is "abcabcabc"
PASS successfullyParsed is true
TEST COMPLETE
file:
<!-- 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>
file frame
show/hide: