1<body>
2<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12485">bug 12485</a>:
3XPath id() function doesn't work as root in paths.</p>
4
5  <div id="a"><div></div></div>
6  <div id="bb"><div></div></div>
7  <div id="ccc"><div></div></div>
8
9<script>
10  if (window.layoutTestController)
11    layoutTestController.dumpAsText();
12
13  var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
14
15  try {
16    result = document.evaluate("id('a bb ccc')[@id != 'ccc']/div", document.body, null, UNORDERED_NODE_SNAPSHOT_TYPE, null);
17
18    if (2 == result.snapshotLength)
19      document.write("SUCCESS");
20    else
21      document.write("FAILURE: " + result.snapshotLength + " result nodes (should be 2)");
22  } catch (ex) {
23    document.write("FAILURE: " + ex);
24  }
25</script>
26</body>
27