зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
4e630fa401
Коммит
ec24917e25
|
@ -27,5 +27,16 @@ test(function() {
|
|||
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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче