1 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=11815">bug
11815</a>:
2 XPathEvaluator behavior does not match Firefox - substring() and empty element.
</p>
5 testRunner
.dumpAsText();
7 var strXML
= '<data><record></record><record>-hi-</record></data>';
8 var doc
= (new DOMParser()).parseFromString(strXML
, "text/xml");
9 var xpe
= new XPathEvaluator();
10 var objResult
= xpe
.evaluate("//record[substring(.,1,1)='-']", doc
, null, 0, null);
13 while (itm
= objResult
.iterateNext()) objNodes
.push(itm
);
15 if (objNodes
.length
== 1)
16 document
.write("SUCCESS");
18 document
.write("FAILURE: matched " + objNodes
.length
+ " nodes.");