3 <script src=
"../../resources/js-test.js"></script>
4 <script src=
"xpath-test-pre.js"></script>
7 <p>This tests that XPath expressions with prefixes work correctly.
</p>
8 <div id=
"console"></div>
10 var xmlString
= '<div/>';
11 var doc
= (new DOMParser()).parseFromString(xmlString
, "text/xml");
12 document
.body
.insertBefore(document
.importNode(doc
.documentElement
, null), document
.body
.firstChild
);
14 var expr
= document
.createExpression("//div", null);
15 var result
= expr
.evaluate(document
.documentElement
, XPathResult
.ORDERED_NODE_SNAPSHOT_TYPE
, null);
16 checkSnapshot("//div", result
, [document
.getElementById("console")]);