2 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=12485">bug
12485</a>:
3 XPath id() function doesn't work as root in paths.
</p>
5 <div id=
"a"><div></div></div>
6 <div id=
"bb"><div></div></div>
7 <div id=
"ccc"><div></div></div>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var UNORDERED_NODE_SNAPSHOT_TYPE
= 6;
16 result
= document
.evaluate("id('a bb ccc')[@id != 'ccc']/div", document
.body
, null, UNORDERED_NODE_SNAPSHOT_TYPE
, null);
18 if (2 == result
.snapshotLength
)
19 document
.write("SUCCESS");
21 document
.write("FAILURE: " + result
.snapshotLength
+ " result nodes (should be 2)");
23 document
.write("FAILURE: " + ex
);