<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[20022] trunk/LayoutTests</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/20022">20022</a></dd>
<dt>Author</dt> <dd>ap</dd>
<dt>Date</dt> <dd>2007-03-07 10:32:11 -0800 (Wed, 07 Mar 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12953
        Import/convert 4XPath test suite

        Import the rest of the converted suite. The only remaining failures are due to
        incorrect node order, bug 12497.

        * fast/xpath/4XPath/Core/test_literal_expr.html: Added.
        * fast/xpath/4XPath/Core/test_location_path.html: Added.
        * fast/xpath/4XPath/Core/test_node_test.html: Added.
        * fast/xpath/4XPath/Core/test_nodeset_expr.html: Added.
        * fast/xpath/4XPath/Core/test_parser-expected.txt: Added.
        * fast/xpath/4XPath/Core/test_parser.html: Added.
        * fast/xpath/4XPath/Core/test_predicate_list.html: Added.
        * fast/xpath/4XPath/Core/test_step-expected.txt: Added.
        * fast/xpath/4XPath/Core/test_step.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_literal_exprhtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_literal_expr.html</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_location_pathhtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_location_path.html</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_node_testhtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_node_test.html</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_nodeset_exprhtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr.html</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_parserexpectedtxt">trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_parserhtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser.html</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_predicate_listhtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_predicate_list.html</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_stepexpectedtxt">trunk/LayoutTests/fast/xpath/4XPath/Core/test_step-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastxpath4XPathCoretest_stephtml">trunk/LayoutTests/fast/xpath/4XPath/Core/test_step.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (20021 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-03-07 16:40:27 UTC (rev 20021)
+++ trunk/LayoutTests/ChangeLog        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2007-03-07  Alexey Proskuryakov  &lt;ap@webkit.org&gt;
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=12953
+        Import/convert 4XPath test suite
+
+        Import the rest of the converted suite. The only remaining failures are due to
+        incorrect node order, bug 12497.
+
+        * fast/xpath/4XPath/Core/test_literal_expr.html: Added.
+        * fast/xpath/4XPath/Core/test_location_path.html: Added.
+        * fast/xpath/4XPath/Core/test_node_test.html: Added.
+        * fast/xpath/4XPath/Core/test_nodeset_expr.html: Added.
+        * fast/xpath/4XPath/Core/test_parser-expected.txt: Added.
+        * fast/xpath/4XPath/Core/test_parser.html: Added.
+        * fast/xpath/4XPath/Core/test_predicate_list.html: Added.
+        * fast/xpath/4XPath/Core/test_step-expected.txt: Added.
+        * fast/xpath/4XPath/Core/test_step.html: Added.
+
</ins><span class="cx"> 2007-03-07  David Kilzer  &lt;ddkilzer@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin.
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_literal_exprhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_literal_expr.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_literal_expr.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_literal_expr.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    shouldBe('document.evaluate(\'&quot;&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;&quot;');
+    shouldBe('document.evaluate(\'&quot;Hi&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;Hi&quot;');
+    shouldBe('document.evaluate(\'&quot;NaN&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;NaN&quot;');
+    shouldBe('document.evaluate(\'&quot;\u2022 = middle dot&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;\u2022 = middle dot&quot;');
+    shouldBe('document.evaluate(\'&quot;0&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;0&quot;');
+    shouldBe('document.evaluate(\'&quot;1&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;1&quot;');
+    shouldBe('document.evaluate(\'&quot;2&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;2&quot;');
+    shouldBe('document.evaluate(\'&quot;3&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;3&quot;');
+    shouldBe('document.evaluate(\'&quot;4&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;4&quot;');
+    shouldBe('document.evaluate(\'&quot;5&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;5&quot;');
+    shouldBe('document.evaluate(\'&quot;31&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;31&quot;');
+    shouldBe('document.evaluate(\'&quot;-1&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;-1&quot;');
+    shouldBe('document.evaluate(\'&quot;-2&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;-2&quot;');
+    shouldBe('document.evaluate(\'&quot;-3&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;-3&quot;');
+    shouldBe('document.evaluate(\'&quot;-4&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;-4&quot;');
+    shouldBe('document.evaluate(\'&quot;-5&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;-5&quot;');
+    shouldBe('document.evaluate(\'&quot;3.1415926535&quot;\', document, null, XPathResult.STRING_TYPE, null).stringValue', '&quot;3.1415926535&quot;');
+
+    shouldBe('document.evaluate(\'0\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '0.0');
+    shouldBe('document.evaluate(\'0.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '0.5');
+    shouldBe('document.evaluate(\'-0.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-0.5');
+    shouldBe('document.evaluate(\'1\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '1.0');
+    shouldBe('document.evaluate(\'-1\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-1.0');
+    shouldBe('document.evaluate(\'1.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '1.5');
+    shouldBe('document.evaluate(\'-1.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-1.5');
+    shouldBe('document.evaluate(\'2\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '2.0');
+    shouldBe('document.evaluate(\'-2\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-2.0');
+    shouldBe('document.evaluate(\'2.6\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '2.6');
+    shouldBe('document.evaluate(\'-2.6\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-2.6');
+    shouldBe('document.evaluate(\'3\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '3.0');
+    shouldBe('document.evaluate(\'-3\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-3.0');
+    shouldBe('document.evaluate(\'31\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '31.0');
+    shouldBe('document.evaluate(\'4\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '4.0');
+    shouldBe('document.evaluate(\'-4\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-4.0');
+    shouldBe('document.evaluate(\'4.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '4.5');
+    shouldBe('document.evaluate(\'-4.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-4.5');
+    shouldBe('document.evaluate(\'5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '5.0');
+    shouldBe('document.evaluate(\'-5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-5.0');
+    shouldBe('document.evaluate(\'-42\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-42.0');
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_literal_expr.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_location_pathhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_location_path.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_location_path.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_location_path.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    result = DOM.evaluate(&quot;//*&quot;, CHILD2, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//*&quot;, result, [ROOT, CHILD1].concat(GCHILDREN1, [CHILD2], GCHILDREN2, [CHILD3, LANG], LCHILDREN));
+
+    result = DOM.evaluate(&quot;*/*&quot;, ROOT, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;*/*&quot;, result, GCHILDREN1.concat(GCHILDREN2, LCHILDREN));
+
+    result = DOM.evaluate(&quot;/&quot;, CHILD1, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;/&quot;, result, [DOM]);
+
+    result = DOM.evaluate(&quot;/child::*&quot;, CHILD2, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;/child::*&quot;, result, [ROOT]);
+
+    result = DOM.evaluate(&quot;child::*/child::*&quot;, ROOT, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;child::*/child::*&quot;, result, GCHILDREN1.concat(GCHILDREN2, LCHILDREN));
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_location_path.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_node_testhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_node_test.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_node_test.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_node_test.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    function nsResolver(prefix) {
+        if (prefix == 'bar')
+            return 'http://foo.com';
+        return null;
+    }
+
+    function nodeInResult(node, result) {
+        for (i=0; i &lt; result.snapshotLength; ++i)
+            if (result.snapshotItem(i) == node)
+                return true;
+        return false;
+    }
+
+    result = DOM.evaluate(&quot;//*&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//bar:CHILD3&quot;, ROOT, nsResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(CHILD1, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(CHILD3, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//bar:*&quot;, ROOT, nsResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(CHILD1, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(CHILD3, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//node()&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;true&quot;);
+    shouldBe(&quot;nodeInResult(TEXT1, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//text()&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(TEXT1, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//comment()&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(COMMENT, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//processing-instruction()&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(ROOT, result)&quot;, &quot;false&quot;);
+    shouldBe(&quot;nodeInResult(PI, result)&quot;, &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;//processing-instruction('xml-stylesheet')&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    shouldBe(&quot;nodeInResult(PI, result)&quot;, &quot;true&quot;);
+    shouldBe(&quot;nodeInResult(PI2, result)&quot;, &quot;false&quot;);
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_node_test.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_nodeset_exprhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    result = DOM.evaluate(&quot;(/ROOT | /ROOT/CHILD1)[true()]&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;(/ROOT | /ROOT/CHILD1)[true()]&quot;, result, [ROOT, CHILD1]);
+
+    result = DOM.evaluate(&quot;(/ROOT | /ROOT/CHILD1)[.=/ROOT]&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;(/ROOT | /ROOT/CHILD1)[.=/ROOT]&quot;, result, [ROOT]);
+
+    result = DOM.evaluate(&quot;(/ROOT | /ROOT/CHILD1) | (/ROOT)&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;(/ROOT | /ROOT/CHILD1) | (/ROOT)&quot;, result, [ROOT, CHILD1]);
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_parserexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+PASS child::*
+PASS /child::*
+PASS /*/*
+PASS /child::*/*/child::GCHILD
+FAIL //* item 2 incorrect (expected GCHILD, actual CHILD2)
+PASS //GCHILD
+PASS //@attr1
+PASS x:GCHILD
+PASS .//GCHILD
+PASS .//GCHILD
+PASS /
+PASS //CHILD1/..
+PASS .//foo:*
+PASS CHILD1 | CHILD2
+PASS descendant::GCHILD[3]
+PASS descendant::GCHILD[parent::CHILD1]
+PASS descendant::GCHILD[position() &gt; 1]
+PASS @attr1[.='val1']
+PASS DOM.evaluate(&quot;1&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue is 1
+PASS DOM.evaluate(&quot;00200&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue is 200
+PASS DOM.evaluate(&quot;3+4*7&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue is 31
+PASS DOM.evaluate(&quot;3-4*1&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue is -1
+PASS DOM.evaluate(&quot;string('1')&quot;, ROOT, null, XPathResult.ANY_TYPE, null).stringValue is '1'
+PASS DOM.evaluate(&quot;concat('1', '2')&quot;, ROOT, null, XPathResult.ANY_TYPE, null).stringValue is '12'
+PASS DOM.evaluate(&quot;true()&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is true
+PASS DOM.evaluate(&quot;false()&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is false
+PASS DOM.evaluate(&quot;1=3&lt;4&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is true
+PASS DOM.evaluate(&quot;1 or 2 and 3&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is true
+PASS DOM.evaluate(&quot;1 and 2 = 3&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is false
+PASS DOM.evaluate(&quot;-1 or 2&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is true
+PASS DOM.evaluate(&quot;. or *&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue is true
+PASS text()
+PASS processing-instruction('f')
+PASS (child::*)
+PASS DOM.evaluate(&quot;. * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is NaN
+PASS DOM.evaluate(&quot;.. * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is NaN
+PASS DOM.evaluate(&quot;/.. * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is NaN
+PASS CHILD2/@CODE
+PASS DOM.evaluate(&quot;CHILD2/@CODE * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
+PASS föø
+PASS DOM.evaluate(&quot;\\&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/plain
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_parserhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    function nsResolver(prefix) {
+        if (prefix == 'x')
+            return 'http://spam.com';
+        return null;
+    }
+
+    result = DOM.evaluate(&quot;child::*&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;child::*&quot;, result, CHILDREN);
+
+    result = DOM.evaluate(&quot;/child::*&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;/child::*&quot;, result, [ROOT]);
+
+    result = DOM.evaluate(&quot;/*/*&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;/*/*&quot;, result, CHILDREN);
+
+    result = DOM.evaluate(&quot;/child::*/*/child::GCHILD&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;/child::*/*/child::GCHILD&quot;, result, GCHILDREN1.concat(GCHILDREN2));
+
+    result = DOM.evaluate(&quot;//*&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//*&quot;, result, [ROOT, CHILD1].concat(GCHILDREN1, [CHILD2], GCHILDREN2, [CHILD3, LANG], LCHILDREN));
+
+    result = DOM.evaluate(&quot;//GCHILD&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//GCHILD&quot;, result, GCHILDREN1.concat(GCHILDREN2));
+
+    result = DOM.evaluate(&quot;//@attr1&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//@attr1&quot;, result, [ATTR1, ATTR2]);
+
+    result = DOM.evaluate(&quot;x:GCHILD&quot;, CHILD1, nsResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;x:GCHILD&quot;, result, []);
+
+    result = DOM.evaluate(&quot;.//GCHILD&quot;, CHILD2, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;.//GCHILD&quot;, result, GCHILDREN2);
+
+    result = DOM.evaluate(&quot;.//GCHILD&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;.//GCHILD&quot;, result, GCHILDREN1.concat(GCHILDREN2));
+
+    result = DOM.evaluate(&quot;/&quot;, text, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;/&quot;, result, [DOM]);
+
+    result = DOM.evaluate(&quot;//CHILD1/..&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//CHILD1/..&quot;, result, [ROOT]);
+
+    result = DOM.evaluate(&quot;.//foo:*&quot;, CHILD3, DOM.createNSResolver(CHILD3), XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;.//foo:*&quot;, result, []);
+
+    result = DOM.evaluate(&quot;CHILD1 | CHILD2&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;CHILD1 | CHILD2&quot;, result, [CHILD1, CHILD2]);
+
+    result = DOM.evaluate(&quot;descendant::GCHILD[3]&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;descendant::GCHILD[3]&quot;, result, [GCHILD21]);
+
+    result = DOM.evaluate(&quot;descendant::GCHILD[parent::CHILD1]&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;descendant::GCHILD[parent::CHILD1]&quot;, result, GCHILDREN1);
+
+    result = DOM.evaluate(&quot;descendant::GCHILD[position() &gt; 1]&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;descendant::GCHILD[position() &gt; 1]&quot;, result, [GCHILD12].concat(GCHILDREN2));
+
+    result = DOM.evaluate(&quot;@attr1[.='val1']&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;@attr1[.='val1']&quot;, result, [ATTR1]);
+
+    shouldBe('DOM.evaluate(&quot;1&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue', &quot;1&quot;);
+    shouldBe('DOM.evaluate(&quot;00200&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue', &quot;200&quot;);
+    shouldBe('DOM.evaluate(&quot;3+4*7&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue', &quot;31&quot;);
+    shouldBe('DOM.evaluate(&quot;3-4*1&quot;, ROOT, null, XPathResult.ANY_TYPE, null).numberValue', &quot;-1&quot;);
+    shouldBe('DOM.evaluate(&quot;string(\'1\')&quot;, ROOT, null, XPathResult.ANY_TYPE, null).stringValue', &quot;'1'&quot;);
+    shouldBe('DOM.evaluate(&quot;concat(\'1\', \'2\')&quot;, ROOT, null, XPathResult.ANY_TYPE, null).stringValue', &quot;'12'&quot;);
+    shouldBe('DOM.evaluate(&quot;true()&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;true&quot;);
+    shouldBe('DOM.evaluate(&quot;false()&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;false&quot;);
+    shouldBe('DOM.evaluate(&quot;1=3&lt;4&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;true&quot;);
+    shouldBe('DOM.evaluate(&quot;1 or 2 and 3&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;true&quot;);
+    shouldBe('DOM.evaluate(&quot;1 and 2 = 3&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;false&quot;);
+    shouldBe('DOM.evaluate(&quot;-1 or 2&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;true&quot;);
+    shouldBe('DOM.evaluate(&quot;. or *&quot;, ROOT, null, XPathResult.ANY_TYPE, null).booleanValue', &quot;true&quot;);
+
+    result = DOM.evaluate(&quot;text()&quot;, CHILD3, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;text()&quot;, result, []);
+
+    result = DOM.evaluate(&quot;processing-instruction('f')&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;processing-instruction('f')&quot;, result, []);
+
+    result = DOM.evaluate(&quot;(child::*)&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;(child::*)&quot;, result, CHILDREN);
+
+    shouldBe('DOM.evaluate(&quot;. * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue', &quot;NaN&quot;);
+    shouldBe('DOM.evaluate(&quot;.. * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue', &quot;NaN&quot;);
+    shouldBe('DOM.evaluate(&quot;/.. * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue', &quot;NaN&quot;);
+
+    result = DOM.evaluate(&quot;CHILD2/@CODE&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;CHILD2/@CODE&quot;, result, [IDATTR2]);
+
+    shouldBe('DOM.evaluate(&quot;CHILD2/@CODE * 0&quot;, ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue', &quot;0&quot;);
+
+    result = DOM.evaluate(&quot;f\xf6\xf8&quot;, LANG, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;f\xf6\xf8&quot;, result, [NONASCIIQNAME]);
+
+    shouldThrow('DOM.evaluate(&quot;\\\\&quot;, ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)');
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_predicate_listhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_predicate_list.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_predicate_list.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_predicate_list.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    result = DOM.evaluate(&quot;self::node()[true() and false()][true()]&quot;, ROOT, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;self::node()[true() and false()][true()]&quot;, result, []);
+
+    result = DOM.evaluate(&quot;self::node()[true() or false()][true()]&quot;, ROOT, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;self::node()[true() or false()][true()]&quot;, result, [ROOT]);
+
+    dom2 = (new DOMParser).parseFromString(
+        &quot;&lt;?xml version='1.0'?&gt;&quot; +
+        &quot;&lt;elementList&gt;&quot; +
+        &quot;    &lt;element&gt;&quot; +
+        &quot;        &lt;x&gt;&quot; +
+        &quot;           &lt;y&gt;a&lt;/y&gt;&quot; +
+        &quot;        &lt;/x&gt;&quot; +
+        &quot;    &lt;/element&gt;&quot; +
+        &quot;    &lt;element&gt;&quot; +
+        &quot;        &lt;x&gt;&quot; +
+        &quot;            &lt;y&gt;z&lt;/y&gt;&quot; +
+        &quot;        &lt;/x&gt;&quot; +
+        &quot;    &lt;/element&gt;&quot; +
+        &quot;&lt;/elementList&gt;&quot;,
+        &quot;application/xml&quot;);
+
+    result = dom2.evaluate(&quot;//element[descendant::y[.='z']]&quot;, dom2, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//element[descendant::y[.='z']]&quot;, result, [dom2.getElementsByTagName(&quot;element&quot;)[1]]);
+
+    result = dom2.evaluate(&quot;//element[descendant::y[.='z']][1]&quot;, dom2, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//element[descendant::y[.='z']][1]&quot;, result, [dom2.getElementsByTagName(&quot;element&quot;)[1]]);
+
+    result = dom2.evaluate(&quot;//element[descendant::y[.='z']][2]&quot;, dom2, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;//element[descendant::y[.='z']][2]&quot;, result, []);
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_predicate_list.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_stepexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_step-expected.txt (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_step-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_step-expected.txt        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+PASS ancestor::*
+FAIL ancestor-or-self::* item 0 incorrect (expected ROOT, actual CHILD1)
+PASS descendant-or-self::*
+PASS child::GCHILD[position()=1]
+PASS child::GCHILD[1]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_step-expected.txt
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/plain
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkLayoutTestsfastxpath4XPathCoretest_stephtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/xpath/4XPath/Core/test_step.html (0 => 20022)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/xpath/4XPath/Core/test_step.html                                (rev 0)
+++ trunk/LayoutTests/fast/xpath/4XPath/Core/test_step.html        2007-03-07 18:32:11 UTC (rev 20022)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    result = DOM.evaluate(&quot;ancestor::*&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;ancestor::*&quot;, result, [ROOT]);
+
+    result = DOM.evaluate(&quot;ancestor-or-self::*&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;ancestor-or-self::*&quot;, result, [ROOT, CHILD1]);
+
+    result = DOM.evaluate(&quot;descendant-or-self::GCHILD&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;descendant-or-self::*&quot;, result, GCHILDREN1);
+
+    result = DOM.evaluate(&quot;child::GCHILD[position()=1]&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;child::GCHILD[position()=1]&quot;, result, [GCHILD11]);
+
+    result = DOM.evaluate(&quot;child::GCHILD[1]&quot;, CHILD1, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    checkSnapshot(&quot;child::GCHILD[1]&quot;, result, [GCHILD11]);
+
+    var successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/xpath/4XPath/Core/test_step.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre>
</div>
</div>

</body>
</html>