Reviewed by Darin.
[WebKit-https.git] / LayoutTests / fast / xpath / 4XPath / Core / test_step.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css">
5 <script src="../../../js/resources/js-test-pre.js"></script>
6 <script src="test.js"></script>
7 </head>
8 <body>
9 <div id="console"></div>
10
11 <script>
12     result = DOM.evaluate("ancestor::*", CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
13     checkSnapshot("ancestor::*", result, [ROOT]);
14
15     result = DOM.evaluate("ancestor-or-self::*", CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
16     checkSnapshot("ancestor-or-self::*", result, [ROOT, CHILD1]);
17
18     result = DOM.evaluate("descendant-or-self::GCHILD", CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
19     checkSnapshot("descendant-or-self::*", result, GCHILDREN1);
20
21     result = DOM.evaluate("child::GCHILD[position()=1]", CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
22     checkSnapshot("child::GCHILD[position()=1]", result, [GCHILD11]);
23
24     result = DOM.evaluate("child::GCHILD[1]", CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
25     checkSnapshot("child::GCHILD[1]", result, [GCHILD11]);
26
27     var successfullyParsed = true;
28
29 </script>
30 <script src="../../../js/resources/js-test-post.js"></script>
31 </body>
32 </html>