Bug 973341 [wpt PR 15266] - [Gecko Bug 973341] XPath evaluate() fails if reusing an iterator result., a=testonly
authorPeter Van der Beken <peterv@propagandism.org>
Mon, 18 Feb 2019 19:25:13 +0000
changeset 519177 3cd20f04f2e8fe498b74173fb3e2d467ecbcae54
parent 519176 2384c1c7af5a385461ca25c280aadaed4e46d3ad
child 519178 aefbbbff52203d20509585e73dda0bdf879b0b40
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs973341, 15266
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 973341 [wpt PR 15266] - [Gecko Bug 973341] XPath evaluate() fails if reusing an iterator result., a=testonly Automatic update from web-platform-tests XPath evaluate() fails if reusing an iterator result. Differential Revision: https://phabricator.services.mozilla.com/D18552 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=973341 gecko-commit: 1c906eec1366ee11052c392e35ad01777f433d91 gecko-integration-branch: central gecko-reviewers: smaug -- wpt-commits: 9b2355cc88e0fdf8cebb6775f6cdeadd7b6a5677 wpt-pr: 15266
testing/web-platform/tests/domxpath/document.tentative.html
--- a/testing/web-platform/tests/domxpath/document.tentative.html
+++ b/testing/web-platform/tests/domxpath/document.tentative.html
@@ -22,10 +22,21 @@ test(function() {
                             null, // resolver
                             XPathResult.ANY_TYPE, // type
                             result); // result
   matched = [];
   while ((cur = result.iterateNext()) !== null) {
     matched.push(cur);
   }
   assert_array_equals(matched, [document]);
+  // Evaluate again, but reuse result from previous evaluation.
+  result = document.evaluate("..", // expression
+                            document.documentElement, // context node
+                            null, // resolver
+                            XPathResult.ANY_TYPE, // type
+                            result); // result
+  matched = [];
+  while ((cur = result.iterateNext()) !== null) {
+    matched.push(cur);
+  }
+  assert_array_equals(matched, [document]);
 });
 </script>