blob: 3ac15ba8c36586d76812ab155e75ce52c056cc56 [file] [log] [blame]
apfd9f8312007-01-29 18:04:14 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html>
4 <body>
5 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12359">bug 12359</a>:
6 XPathEvaluator may return some nodes more than once in a result set.</p>
7
8 <div>
9 <div>
10 <div></div>
11 </div>
12 </div>
13
14 <script type="text/javascript">
rniwa@webkit.org224c8b52012-08-04 01:13:22 +000015 if (window.testRunner)
16 testRunner.dumpAsText();
apfd9f8312007-01-29 18:04:14 +000017
18 try {
19 var result = document.evaluate("//div//div | //div/div", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
20
21 if (result.snapshotLength == 2)
22 document.write("SUCCESS");
23 else
24 document.write(result.snapshotLength + " matches (should be 2)");
25
26 } catch (ex) {
27 document.write("Exception: " + ex);
28 }
29 </script>
30 </body>
31</html>