ancestor-axis.html revision 5f90462bbf4efb0ac7bb65a852d5559d0ab30f0b
1<html> 2<body> 3<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12619">bug 12619</a>: 4Non-abbreviated XPaths don't work.</p> 5 6 <div id="a"></div> 7 8<script> 9 if (window.layoutTestController) 10 layoutTestController.dumpAsText(); 11 12 try { 13 result = document.evaluate("//div/ancestor::*", document.body, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); 14 15 if (2 == result.snapshotLength) 16 document.write("SUCCESS"); 17 else 18 document.write("FAILURE: " + result.snapshotLength + " result nodes (should be 2)"); 19 } catch (ex) { 20 document.write("FAILURE: " + ex); 21 } 22</script> 23</body> 24</html> 25