Lint WPT test

Signed-off-by: Ville Lindholm <ville@lindholm.dev>
This commit is contained in:
Ville Lindholm 2025-06-01 14:25:41 +03:00
parent 3d9cefffab
commit de6b290edf
No known key found for this signature in database

View file

@ -10,7 +10,6 @@ function testIdFunction(expression, xmlString, expectedIds) {
test(() => {
let result = doc.evaluate(expression, doc.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
assert_equals(result.resultType, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE);
let actualIds = [];
for (let i = 0; i < result.snapshotLength; i++) {
actualIds.push(result.snapshotItem(i).getAttribute('id'));
@ -45,4 +44,4 @@ testIdFunction('id("")', '<root><div id="">Empty ID</div></root>', []);
// Test whitespace in ID string
testIdFunction('id(" test1 ")', '<root><div id="test1">Match</div></root>', ['test1']);
</script>
</body>
</body>