1 <body> 2 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12452">bug 12452</a>: 3 XPath id() function is not supported.</p> 4 5 <div id=test1 style="display:none"> 6 a 7 </div> 8 <div id=test2 style="display:none"> 9 b c 10 d 11 </div> 12 13 <div id="a"></div> 14 <div id="b"></div> 15 <div id="c"></div> 16 <div id="d"></div> 17 18 <script> 19 if (window.layoutTestController) 20 layoutTestController.dumpAsText(); 21 22 var UNORDERED_NODE_SNAPSHOT_TYPE = 6; 23 24 result = document.evaluate("id(id(' test1 test2 '))", document.body, null, UNORDERED_NODE_SNAPSHOT_TYPE, null); 25 26 if (4 == result.snapshotLength) 27 document.write("SUCCESS"); 28 else 29 document.write("FAILURE: " + result.snapshotLength + " result nodes (should be 4)"); 30 </script> 31 </body> 32