diff options
author | cybai <cyb.ai.815@gmail.com> | 2023-04-19 18:03:57 +0900 |
---|---|---|
committer | cybai <cyb.ai.815@gmail.com> | 2023-04-21 15:21:53 +0900 |
commit | c77e4e4e69ee50e971f781d03a43cb7ef862a9ec (patch) | |
tree | 7b27a7e352951a3423115a7b377ef84db4682e71 /tests | |
parent | 9acb9cc5cf21d14709355a3c75af7202e9301bd5 (diff) | |
download | servo-c77e4e4e69ee50e971f781d03a43cb7ef862a9ec.tar.gz servo-c77e4e4e69ee50e971f781d03a43cb7ef862a9ec.zip |
Fix checking for empty set for getElementsByClassName
Because empty set with `.all(predicate)` will always return `true`, it
will result in always filtering wrong elements when the classes is empty
set.
Thus, we return earlier with `always_empty` HTMLCollection in the mpety
classes case so that we can avoid filtering on empty sets.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wpt/metadata/dom/nodes/getElementsByClassName-empty-set.html.ini | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/wpt/metadata/dom/nodes/getElementsByClassName-empty-set.html.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-empty-set.html.ini deleted file mode 100644 index 88cb5872361..00000000000 --- a/tests/wpt/metadata/dom/nodes/getElementsByClassName-empty-set.html.ini +++ /dev/null @@ -1,10 +0,0 @@ -[getElementsByClassName-empty-set.html] - [Passing a space to getElementsByClassName should return an empty HTMLCollection] - expected: FAIL - - [Passing three spaces to getElementsByClassName should return an empty HTMLCollection] - expected: FAIL - - [Passing an empty string to getElementsByClassName should return an empty HTMLCollection] - expected: FAIL - |