Automatic update from web-platform-tests XPath: Fix issues on context node The following operations and functions had issues applying wrong context nodes to non-first arguments. This CL fixes them. - Operators: or and = != < > <= >= + - * div mod - Functions: concat() starts-with() contains() substring-before() substring-after() substring() translate() Bug: 1036075 Change-Id: I87b393557dc55897d01f6ea627ae83a34cf45331 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977884 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#727076} -- wpt-commits: e8344eada3da824bf7e8d353478424f9ddc6b588 wpt-pr: 20879
16 lines
613 B
HTML
16 lines
613 B
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://www.w3.org/TR/1999/REC-xpath-19991116/#function-substring-after">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="helpers.js"></script>
|
|
<body>
|
|
<div id="context"></div>
|
|
<script>
|
|
test(() => {
|
|
const context = document.querySelector('#context');
|
|
context.innerHTML = '<span>^^^bar$$$</span><span>bar<b>^</b></span><b>bar</b>';
|
|
assert_equals(evaluateString('substring-after((./span)[1], ./b)', context), '$$$');
|
|
}, 'substring-after() arguments depending on the context node');
|
|
</script>
|
|
</body>
|