5 testRunner
.dumpAsText();
13 "id('nested1')/div[1]",
14 "id('nested1')//div[1]",
15 "id('nested1')/div[1]/input[2]",
16 "id('nested1')/div[1]//input[2]",
17 "id('nested1')//div[1]/input[2]",
18 "id('nested1')//div[1]//input[2]"
20 for (var i
= 0; i
< tests
.length
; i
++) {
23 document
.getElementById('results').innerHTML
= results
;
26 function runXPath(xpath
) {
27 var result
= document
.evaluate(xpath
, document
, null, XPathResult
.ANY_TYPE
, null).iterateNext();
28 results
+= xpath
+ " " + (result
? "PASSED" : "FAILED") + ": " + result
+ "<br />";
32 <body onload=
"init()">
33 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=15380">bug
15380</a>:
34 XPath: id('foo') doesn't resolve correctly.
</p>
37 <input id=
"nested3a" type=
"button" value=
"nested3a">
38 <input id=
"nested3b" type=
"button" value=
"nested3b">
41 <div id=
"results"></div>