mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Lint WPT test
Signed-off-by: Ville Lindholm <ville@lindholm.dev>
This commit is contained in:
parent
3d9cefffab
commit
de6b290edf
1 changed files with 1 additions and 2 deletions
3
tests/wpt/tests/domxpath/fn-id.html
vendored
3
tests/wpt/tests/domxpath/fn-id.html
vendored
|
@ -10,7 +10,6 @@ function testIdFunction(expression, xmlString, expectedIds) {
|
||||||
test(() => {
|
test(() => {
|
||||||
let result = doc.evaluate(expression, doc.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
|
let result = doc.evaluate(expression, doc.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
|
||||||
assert_equals(result.resultType, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE);
|
assert_equals(result.resultType, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE);
|
||||||
|
|
||||||
let actualIds = [];
|
let actualIds = [];
|
||||||
for (let i = 0; i < result.snapshotLength; i++) {
|
for (let i = 0; i < result.snapshotLength; i++) {
|
||||||
actualIds.push(result.snapshotItem(i).getAttribute('id'));
|
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
|
// Test whitespace in ID string
|
||||||
testIdFunction('id(" test1 ")', '<root><div id="test1">Match</div></root>', ['test1']);
|
testIdFunction('id(" test1 ")', '<root><div id="test1">Match</div></root>', ['test1']);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
Loading…
Add table
Add a link
Reference in a new issue